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

Unified Diff: Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp

Issue 7740035: Merge 91802 - V8 custom bindings for AudioNode must do proper object checking and throw exception... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp
===================================================================
--- Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp (revision 93818)
+++ Source/WebCore/bindings/v8/custom/V8AudioNodeCustom.cpp (working copy)
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698