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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp

Issue 2617653002: bindings: Don't throw a TypeError when 'null' is passed to nullable callback function (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
index 7cce342f8d6d808bab306396a1694ca1ff76fda2..7913fe9fb93f3464e4e51b37b3d0e063653a7d2b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
@@ -22,6 +22,13 @@
namespace blink {
+// static
+AnyCallbackFunctionOptionalAnyArg* AnyCallbackFunctionOptionalAnyArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback){
+ if (isUndefinedOrNull(callback))
+ return nullptr;
+ return new AnyCallbackFunctionOptionalAnyArg(scriptState, v8::Local<v8::Function>::Cast(callback));
+}
+
AnyCallbackFunctionOptionalAnyArg::AnyCallbackFunctionOptionalAnyArg(ScriptState* scriptState, v8::Local<v8::Function> callback)
: m_scriptState(scriptState),
m_callback(scriptState->isolate(), this, callback) {

Powered by Google App Engine
This is Rietveld 408576698