diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp')
-rw-r--r-- | Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp b/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp index 0b6f98ce1..471897834 100644 --- a/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp +++ b/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(PERFORMANCE_TIMELINE) +#if ENABLE(WEB_TIMING) #include "JSPerformanceEntry.h" @@ -46,27 +46,25 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, PerformanceEntry* entry) +JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref<PerformanceEntry>&& entry) { - if (!entry) - return jsNull(); + if (is<PerformanceResourceTiming>(entry)) + return createWrapper<PerformanceResourceTiming>(globalObject, WTFMove(entry)); -#if ENABLE(RESOURCE_TIMING) - if (entry->isResource()) - return wrap<JSPerformanceResourceTiming>(exec, globalObject, static_cast<PerformanceResourceTiming*>(entry)); -#endif + if (is<PerformanceMark>(entry)) + return createWrapper<PerformanceMark>(globalObject, WTFMove(entry)); -#if ENABLE(USER_TIMING) - if (entry->isMark()) - return wrap<JSPerformanceMark>(exec, globalObject, static_cast<PerformanceMark*>(entry)); + if (is<PerformanceMeasure>(entry)) + return createWrapper<PerformanceMeasure>(globalObject, WTFMove(entry)); - if (entry->isMeasure()) - return wrap<JSPerformanceMeasure>(exec, globalObject, static_cast<PerformanceMeasure*>(entry)); -#endif + return createWrapper<PerformanceEntry>(globalObject, WTFMove(entry)); +} - return wrap<JSPerformanceEntry>(exec, globalObject, entry); +JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, PerformanceEntry& entry) +{ + return wrap(state, globalObject, entry); } } // namespace WebCore -#endif // ENABLE(PERFORMANCE_TIMELINE) +#endif // ENABLE(WEB_TIMING) |