Title: [228276] trunk/Source/WebCore
- Revision
- 228276
- Author
- [email protected]
- Date
- 2018-02-08 09:49:10 -0800 (Thu, 08 Feb 2018)
Log Message
Unreviewed, tiny partial rollout of r228260 as it caused some worker failures
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::toJSDOMGlobalObject): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (228275 => 228276)
--- trunk/Source/WebCore/ChangeLog 2018-02-08 17:11:09 UTC (rev 228275)
+++ trunk/Source/WebCore/ChangeLog 2018-02-08 17:49:10 UTC (rev 228276)
@@ -1,3 +1,15 @@
+2018-02-08 Chris Dumez <[email protected]>
+
+ Unreviewed, tiny partial rollout of r228260 as it caused some worker failures
+
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::toJSDOMGlobalObject):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSErrorHandler.cpp:
+ (WebCore::JSErrorHandler::handleEvent):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::toJSDOMGlobalObject): Deleted.
+
2018-02-08 Zalan Bujtas <[email protected]>
[RenderTreeBuilder] Move RenderElement::removeAnonymousWrappersForInlinesIfNecessary to RenderTreeBuilder
Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (228275 => 228276)
--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2018-02-08 17:11:09 UTC (rev 228275)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2018-02-08 17:49:10 UTC (rev 228276)
@@ -274,4 +274,16 @@
return *jsCast<JSDOMGlobalObject*>(iter.globalObject() ? iter.globalObject() : state.vmEntryGlobalObject());
}
+JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext& context, DOMWrapperWorld& world)
+{
+ if (is<Document>(context))
+ return toJSDOMWindow(downcast<Document>(context).frame(), world);
+
+ if (is<WorkerGlobalScope>(context))
+ return downcast<WorkerGlobalScope>(context).script()->workerGlobalScopeWrapper();
+
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h (228275 => 228276)
--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h 2018-02-08 17:11:09 UTC (rev 228275)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h 2018-02-08 17:49:10 UTC (rev 228276)
@@ -126,4 +126,6 @@
WEBCORE_EXPORT JSDOMGlobalObject& callerGlobalObject(JSC::ExecState&);
+JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext&, DOMWrapperWorld&);
+
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/js/JSErrorHandler.cpp (228275 => 228276)
--- trunk/Source/WebCore/bindings/js/JSErrorHandler.cpp 2018-02-08 17:11:09 UTC (rev 228275)
+++ trunk/Source/WebCore/bindings/js/JSErrorHandler.cpp 2018-02-08 17:49:10 UTC (rev 228276)
@@ -71,7 +71,7 @@
if (!jsFunction)
return;
- auto* globalObject = toJSDOMWindow(downcast<Document>(scriptExecutionContext).frame(), isolatedWorld());
+ auto* globalObject = toJSDOMGlobalObject(scriptExecutionContext, isolatedWorld());
if (!globalObject)
return;
Modified: trunk/Source/WebCore/bindings/js/JSEventListener.cpp (228275 => 228276)
--- trunk/Source/WebCore/bindings/js/JSEventListener.cpp 2018-02-08 17:11:09 UTC (rev 228275)
+++ trunk/Source/WebCore/bindings/js/JSEventListener.cpp 2018-02-08 17:49:10 UTC (rev 228276)
@@ -26,6 +26,7 @@
#include "HTMLElement.h"
#include "JSDOMConvertNullable.h"
#include "JSDOMConvertStrings.h"
+#include "JSDOMGlobalObject.h"
#include "JSDocument.h"
#include "JSEvent.h"
#include "JSEventTarget.h"
@@ -95,18 +96,6 @@
event.setReturnValue(returnValue);
}
-static JSDOMGlobalObject* toJSDOMGlobalObject(ScriptExecutionContext& context, DOMWrapperWorld& world)
-{
- if (is<Document>(context))
- return toJSDOMWindow(downcast<Document>(context).frame(), world);
-
- if (is<WorkerGlobalScope>(context))
- return downcast<WorkerGlobalScope>(context).script()->workerGlobalScopeWrapper();
-
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
void JSEventListener::handleEvent(ScriptExecutionContext& scriptExecutionContext, Event& event)
{
if (scriptExecutionContext.isJSExecutionForbidden())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes