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

Unified Diff: third_party/WebKit/Source/modules/notifications/NotificationData.cpp

Issue 2010103002: [Binding] [Refactoring] Remove redundant overloaded methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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/modules/notifications/NotificationData.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
index 253d4fdc7c3aa335e49d529eedb6a15fc948338b..7f2da17c5ec1edd2a19b2b883f433b127d1d1bb4 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
@@ -72,7 +72,10 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext
webData.requireInteraction = options.requireInteraction();
if (options.hasData()) {
- RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValueFactory::instance().create(options.data().isolate(), options.data(), nullptr, exceptionState);
+ const ScriptValue& data = options.data();
+ v8::Isolate* isolate = data.isolate();
+ DCHECK(isolate->InContext());
+ RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValueFactory::instance().create(isolate, data.v8Value(), nullptr, nullptr, exceptionState);
if (exceptionState.hadException())
return WebNotificationData();

Powered by Google App Engine
This is Rietveld 408576698