OLD | NEW |
---|---|
(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" | |
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 v8::Handle<v8::Value> result; | |
18 | |
19 if (impl->data()) | |
20 result = impl->data()->deserialize(info.GetIsolate()); | |
21 else | |
22 result = v8::Null(info.GetIsolate()); | |
23 | |
24 v8SetReturnValue(info, result); | |
Peter Beverloo
2015/03/10 23:34:26
I'm not too familiar with custom bindings, but as
Sanghyun Park
2015/03/11 10:59:52
Your suggestion codes are more clean than this.
I'
| |
25 } | |
26 | |
27 } | |
Peter Beverloo
2015/03/10 23:34:26
micro nit: // namespace blink
Sanghyun Park
2015/03/11 10:59:51
Done.
| |
OLD | NEW |