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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp

Issue 1411093002: PrivateScriptRunner::installClassIfNeeded should not run for a null frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/LayoutTests/fast/html/marquee-without-frame-no-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
index 24e1cdf10105ae3604bb0f05620784c4f51da439..3f0c2b2099113123c4bf7f9ac4ebadcd51b489e0 100644
--- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
@@ -228,6 +228,9 @@ static void initializeHolderIfNeeded(ScriptState* scriptState, v8::Local<v8::Obj
v8::Local<v8::Value> PrivateScriptRunner::installClassIfNeeded(Document* document, String className)
{
+ if (!document->contextDocument()->frame())
+ return v8::Local<v8::Value>();
+
v8::HandleScope handleScope(toIsolate(document));
ScriptState* scriptState = ScriptState::forWorld(document->contextDocument()->frame(), DOMWrapperWorld::privateScriptIsolatedWorld());
if (!scriptState->contextIsValid())
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/marquee-without-frame-no-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698