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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.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/modules/VoidCallbackFunctionModules.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
index c18376ada9213845c6589a4450c9663d5403c9e4..f56d98ba769467ca90dd4b51c22d677a5212ca54 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
@@ -21,6 +21,13 @@
namespace blink {
+// static
+VoidCallbackFunctionModules* VoidCallbackFunctionModules::create(ScriptState* scriptState, v8::Local<v8::Value> callback){
+ if (isUndefinedOrNull(callback))
+ return nullptr;
+ return new VoidCallbackFunctionModules(scriptState, v8::Local<v8::Function>::Cast(callback));
+}
+
VoidCallbackFunctionModules::VoidCallbackFunctionModules(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