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

Unified Diff: Source/web/WebArrayBufferConverter.cpp

Issue 1166793006: bindings: Stop using the given creationContext in 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 | « no previous file | Source/web/WebBlob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebArrayBufferConverter.cpp
diff --git a/Source/web/WebArrayBufferConverter.cpp b/Source/web/WebArrayBufferConverter.cpp
index c54f14c3bb23655a23466e6478ebcb17053af208..4044b7d70bf8dedcba07d137c2cb0461167e5d89 100644
--- a/Source/web/WebArrayBufferConverter.cpp
+++ b/Source/web/WebArrayBufferConverter.cpp
@@ -35,11 +35,13 @@
namespace blink {
-v8::Local<v8::Value> WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
+v8::Local<v8::Value> WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, 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.
if (!buffer)
return v8::Local<v8::Value>();
- return toV8(PassRefPtr<DOMArrayBuffer>(*buffer), creationContext, isolate);
+ return toV8(PassRefPtr<DOMArrayBuffer>(*buffer), isolate->GetCurrentContext()->Global(), isolate);
}
WebArrayBuffer* WebArrayBufferConverter::createFromV8Value(v8::Local<v8::Value> value, v8::Isolate* isolate)
« no previous file with comments | « no previous file | Source/web/WebBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698