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

Unified Diff: Source/bindings/v8/V8Binding.h

Issue 19765010: postMessage() should throw a DataCloneError on invalid transferables (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | « LayoutTests/fast/workers/worker-multi-port-expected.txt ('k') | Source/bindings/v8/V8Utilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.h
diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
index 9ed124a8430573db9d024008b4a200db6e586ffd..d5ced8a3326624403c350ff71d42a004c9ddb690 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -399,8 +399,11 @@ namespace WebCore {
};
template <class T, class V8T>
- Vector<RefPtr<T> > toRefPtrNativeArray(v8::Handle<v8::Value> value, v8::Isolate* isolate)
+ Vector<RefPtr<T> > toRefPtrNativeArray(v8::Handle<v8::Value> value, v8::Isolate* isolate, bool* success = 0)
{
+ if (success)
+ *success = true;
+
if (!value->IsArray())
return Vector<RefPtr<T> >();
@@ -415,6 +418,8 @@ namespace WebCore {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(element);
result.append(V8T::toNative(object));
} else {
+ if (success)
+ *success = false;
throwTypeError("Invalid Array element type", isolate);
return Vector<RefPtr<T> >();
}
« no previous file with comments | « LayoutTests/fast/workers/worker-multi-port-expected.txt ('k') | Source/bindings/v8/V8Utilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698