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

Side by Side Diff: Source/bindings/modules/v8/custom/V8NotificationCustom.cpp

Issue 993893002: Add the data attribute to the Notification object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "bindings/modules/v8/V8Notification.h"
7
8 #include "bindings/core/v8/SerializedScriptValue.h"
Peter Beverloo 2015/03/12 01:16:26 nit: you can drop this include
Sanghyun Park 2015/03/12 02:58:47 I'll remove this.
9 #include "modules/notifications/Notification.h"
10
11 namespace blink {
12
13 void V8Notification::dataAttributeGetterCustom(const v8::PropertyCallbackInfo<v8 ::Value>& info)
14 {
15 v8::Local<v8::Object> holder = info.Holder();
16 Notification* impl = V8Notification::toImpl(holder);
17 if (!impl->data()) {
18 v8SetReturnValueNull(info);
19 return;
20 }
21
22 v8SetReturnValue(info, impl->data()->deserialize(info.GetIsolate()));
23 }
24
25 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698