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

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

Issue 654583003: Use the Document rather than the Frame's execution context to install JS-based marquee elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 | « Source/bindings/core/v8/PrivateScriptRunner.h ('k') | Source/core/html/HTMLMarqueeElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/PrivateScriptRunner.cpp
diff --git a/Source/bindings/core/v8/PrivateScriptRunner.cpp b/Source/bindings/core/v8/PrivateScriptRunner.cpp
index 4b4343aa370ba91785c5250d35c63d564fa965b5..136998c76a9ef1dc8d46c3a14b48604ffa37330c 100644
--- a/Source/bindings/core/v8/PrivateScriptRunner.cpp
+++ b/Source/bindings/core/v8/PrivateScriptRunner.cpp
@@ -14,6 +14,7 @@
#ifndef NDEBUG
#include "core/PrivateScriptSourcesForTesting.h"
#endif
+#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "platform/PlatformResourceLoader.h"
@@ -170,12 +171,10 @@ static void initializeHolderIfNeeded(ScriptState* scriptState, v8::Handle<v8::Ob
}
}
-v8::Handle<v8::Value> PrivateScriptRunner::installClassIfNeeded(LocalFrame* frame, String className)
+v8::Handle<v8::Value> PrivateScriptRunner::installClassIfNeeded(Document* document, String className)
{
- if (!frame)
- return v8::Handle<v8::Value>();
- v8::HandleScope handleScope(toIsolate(frame));
- v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
+ v8::HandleScope handleScope(toIsolate(document));
+ v8::Handle<v8::Context> context = toV8Context(document->contextDocument().get(), DOMWrapperWorld::privateScriptIsolatedWorld());
if (context.IsEmpty())
return v8::Handle<v8::Value>();
ScriptState* scriptState = ScriptState::from(context);
« no previous file with comments | « Source/bindings/core/v8/PrivateScriptRunner.h ('k') | Source/core/html/HTMLMarqueeElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698