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

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

Issue 2794023002: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 1) (Closed)
Patch Set: Code review changes Created 3 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
index ffa410854cae6c8514db28e7cac8c300ce269dbe..a6868e5ebaae865d953a750241d7a3bed53c9838 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp
@@ -82,18 +82,11 @@ LocalDOMWindow* ScriptState::domWindow() const {
}
ScriptState* ScriptState::forMainWorld(LocalFrame* frame) {
- return ScriptState::forWorld(frame, DOMWrapperWorld::mainWorld());
+ return toScriptStateForMainWorld(frame);
}
ScriptState* ScriptState::forWorld(LocalFrame* frame, DOMWrapperWorld& world) {
- ASSERT(frame);
- v8::HandleScope handleScope(toIsolate(frame));
- v8::Local<v8::Context> context = toV8Context(frame, world);
- if (context.IsEmpty())
- return nullptr;
- ScriptState* scriptState = ScriptState::from(context);
- ASSERT(scriptState->contextIsValid());
- return scriptState;
+ return toScriptState(frame, world);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptState.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698