Title: [93819] branches/chromium/835/Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp
- Revision
- 93819
- Author
- [email protected]
- Date
- 2011-08-25 13:50:19 -0700 (Thu, 25 Aug 2011)
Log Message
Merge 91802 - V8 custom bindings for AudioNode must do proper object checking and throw exception in case of error
https://bugs.webkit.org/show_bug.cgi?id=65222
BUG=94273
Review URL: http://codereview.chromium.org/7740035
Modified Paths
Diff
Modified: branches/chromium/835/Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp (93818 => 93819)
--- branches/chromium/835/Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp 2011-08-25 20:37:12 UTC (rev 93818)
+++ branches/chromium/835/Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp 2011-08-25 20:50:19 UTC (rev 93819)
@@ -41,7 +41,10 @@
if (args.Length() < 1)
return throwError("Not enough arguments", V8Proxy::SyntaxError);
- AudioNode* destinationNode = toNative(args[0]->ToObject());
+ AudioNode* destinationNode = 0;
+ if (V8AudioNode::HasInstance(args[0]))
+ destinationNode = toNative(args[0]->ToObject());
+
if (!destinationNode)
return throwError("Invalid destination node", V8Proxy::SyntaxError);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes