Title: [125946] trunk/Source/WebCore
- Revision
- 125946
- Author
- [email protected]
- Date
- 2012-08-17 16:27:45 -0700 (Fri, 17 Aug 2012)
Log Message
REGRESSION (r125912): Crashes in worker tests
https://bugs.webkit.org/show_bug.cgi?id=94390
Reviewed by Brady Eidson and Sam Weinig.
* bindings/js/JSDOMBinding.cpp: (WebCore::reportException): It's always fine
to report an exception on a worker context, but it's not fine to treat those as windows.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (125945 => 125946)
--- trunk/Source/WebCore/ChangeLog 2012-08-17 23:14:20 UTC (rev 125945)
+++ trunk/Source/WebCore/ChangeLog 2012-08-17 23:27:45 UTC (rev 125946)
@@ -1,3 +1,13 @@
+2012-08-17 Alexey Proskuryakov <[email protected]>
+
+ REGRESSION (r125912): Crashes in worker tests
+ https://bugs.webkit.org/show_bug.cgi?id=94390
+
+ Reviewed by Brady Eidson and Sam Weinig.
+
+ * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): It's always fine
+ to report an exception on a worker context, but it's not fine to treat those as windows.
+
2012-08-17 James Robinson <[email protected]>
[chromium] Add missing header files to .gypi and missing include to CCTiledLayerImpl.cpp
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (125945 => 125946)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2012-08-17 23:14:20 UTC (rev 125945)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2012-08-17 23:27:45 UTC (rev 125946)
@@ -158,10 +158,13 @@
if (ExceptionBase* exceptionBase = toExceptionBase(exception))
errorMessage = stringToUString(exceptionBase->message() + ": " + exceptionBase->description());
- DOMWindow* activeWindow = activeDOMWindow(exec);
- if (!activeWindow->isCurrentlyDisplayedInFrame())
- return;
- activeWindow->scriptExecutionContext()->reportException(ustringToString(errorMessage), lineNumber, ustringToString(exceptionSourceURL), 0);
+ JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
+ if (JSDOMWindow* window = jsDynamicCast<JSDOMWindow*>(globalObject)) {
+ if (!window->impl()->isCurrentlyDisplayedInFrame())
+ return;
+ }
+ ScriptExecutionContext* scriptExecutionContext = globalObject->scriptExecutionContext();
+ scriptExecutionContext->reportException(ustringToString(errorMessage), lineNumber, ustringToString(exceptionSourceURL), 0);
}
void reportCurrentException(ExecState* exec)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes