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

Unified Diff: Source/web/WebBlob.cpp

Issue 1181943005: bindings: Adds ASSERTs to check the creation context passed to public APIs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/web/WebArrayBufferConverter.cpp ('k') | Source/web/WebDOMError.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebBlob.cpp
diff --git a/Source/web/WebBlob.cpp b/Source/web/WebBlob.cpp
index 23727d425acbcbaf411e484e9acfefadc7d5231b..8adccc2ee964ea066cd8d1d73b1e82855884fed2 100644
--- a/Source/web/WebBlob.cpp
+++ b/Source/web/WebBlob.cpp
@@ -79,10 +79,11 @@ WebString WebBlob::uuid()
return m_private->uuid();
}
-v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> /* creationContext */, v8::Isolate* isolate)
+v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
// We no longer use |creationContext| because it's often misused and points
// to a context faked by user script.
+ ASSERT(creationContext->CreationContext() == isolate->GetCurrentContext());
if (!m_private.get())
return v8::Local<v8::Value>();
return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate);
« no previous file with comments | « Source/web/WebArrayBufferConverter.cpp ('k') | Source/web/WebDOMError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698