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

Unified Diff: Source/bindings/v8/ScriptValue.cpp

Issue 326853002: Revert of Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/v8/ScriptValue.h ('k') | Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptValue.cpp
diff --git a/Source/bindings/v8/ScriptValue.cpp b/Source/bindings/v8/ScriptValue.cpp
index bdfbe082258abdd7f5c287e8103bfcddbf034e72..70c0e4189e82f46672b7fb379df18f567f17c77c 100644
--- a/Source/bindings/v8/ScriptValue.cpp
+++ b/Source/bindings/v8/ScriptValue.cpp
@@ -41,29 +41,12 @@
{
}
-v8::Handle<v8::Value> ScriptValue::v8Value() const
-{
- if (isEmpty())
- return v8::Handle<v8::Value>();
-
- ASSERT(isolate()->InContext());
-
- // This is a check to validate that you don't return a ScriptValue to a world different
- // from the world that created the ScriptValue.
- // Probably this could be:
- // if (&m_scriptState->world() == &DOMWrapperWorld::current(isolate()))
- // return v8::Handle<v8::Value>();
- // instead of triggering RELEASE_ASSERT.
- RELEASE_ASSERT(&m_scriptState->world() == &DOMWrapperWorld::current(isolate()));
- return m_value->newLocal(isolate());
-}
-
bool ScriptValue::toString(String& result) const
{
if (isEmpty())
return false;
- ScriptState::Scope scope(m_scriptState.get());
+ v8::HandleScope handleScope(isolate());
v8::Handle<v8::Value> string = v8Value();
if (string.IsEmpty() || !string->IsString())
return false;
« no previous file with comments | « Source/bindings/v8/ScriptValue.h ('k') | Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698