Title: [99386] trunk/Source/WebCore
- Revision
- 99386
- Author
- [email protected]
- Date
- 2011-11-06 14:52:22 -0800 (Sun, 06 Nov 2011)
Log Message
Don't crash when a context hasn't been created. This fixed a
testing-only crash on the bots in the Chromium port.
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99385 => 99386)
--- trunk/Source/WebCore/ChangeLog 2011-11-06 22:45:25 UTC (rev 99385)
+++ trunk/Source/WebCore/ChangeLog 2011-11-06 22:52:22 UTC (rev 99386)
@@ -1,3 +1,11 @@
+2011-11-06 Adam Barth <[email protected]>
+
+ Don't crash when a context hasn't been created. This fixed a
+ testing-only crash on the bots in the Chromium port.
+
+ * testing/v8/WebCoreTestSupport.cpp:
+ (WebCoreTestSupport::resetInternalsObject):
+
2011-11-06 Darin Adler <[email protected]>
Leaks seen in RenderFlowThread::setRegionRangeForBox on Leaks bot
Modified: trunk/Source/WebCore/testing/v8/WebCoreTestSupport.cpp (99385 => 99386)
--- trunk/Source/WebCore/testing/v8/WebCoreTestSupport.cpp 2011-11-06 22:45:25 UTC (rev 99385)
+++ trunk/Source/WebCore/testing/v8/WebCoreTestSupport.cpp 2011-11-06 22:52:22 UTC (rev 99386)
@@ -47,11 +47,15 @@
void resetInternalsObject(v8::Local<v8::Context> context)
{
+ // This can happen if _javascript_ is disabled in the main frame.
+ if (context.IsEmpty())
+ return;
+
v8::Context::Scope contextScope(context);
v8::HandleScope scope;
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(v8::String::New(Internals::internalsId)));
- Internals * internals = V8Internals::toNative(object);
+ Internals* internals = V8Internals::toNative(object);
if (internals) {
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
if (scriptContext->isDocument())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes