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

Unified Diff: third_party/WebKit/Source/core/testing/CallbackFunctionTest.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/core/testing/CallbackFunctionTest.cpp
diff --git a/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
index ac5e2815802d91f95610b9c558075a2f25ef8696..0cf4339345e4dd4829284038987d8ab0513ce45b 100644
--- a/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
+++ b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
@@ -29,6 +29,16 @@ String CallbackFunctionTest::testCallback(TestCallback* callback,
return String("Error!");
}
+String CallbackFunctionTest::testNullableCallback(
+ TestCallback* callback,
+ const String& message1,
+ const String& message2,
+ ExceptionState& exceptionState) {
+ if (!callback)
+ return String("Empty callback");
+ return testCallback(callback, message1, message2, exceptionState);
+}
+
void CallbackFunctionTest::testInterfaceCallback(
TestInterfaceCallback* callback,
HTMLDivElement* divElement,

Powered by Google App Engine
This is Rietveld 408576698