Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: Source/WebCore/bindings/v8/V8Helpers.cpp

Issue 9334005: Merge 106722 - [Chromium] WebCore::toV8Context crashes if DomWindow::frame() returns null. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/V8Helpers.cpp
===================================================================
--- Source/WebCore/bindings/v8/V8Helpers.cpp (revision 106820)
+++ Source/WebCore/bindings/v8/V8Helpers.cpp (working copy)
@@ -42,7 +42,7 @@
{
V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject);
DOMWindow* domWindow = object->rootObject;
- if (!domWindow || domWindow != domWindow->frame()->domWindow())
+ if (!domWindow || !domWindow->frame() || domWindow != domWindow->frame()->domWindow())
return v8::Local<v8::Context>();
return V8Proxy::mainWorldContext(object->rootObject->frame());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698