OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 152 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
153 { | 153 { |
154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
155 TestNodeV8Internal::hrefCallWithAttributeSetter(jsValue, info); | 155 TestNodeV8Internal::hrefCallWithAttributeSetter(jsValue, info); |
156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
157 } | 157 } |
158 | 158 |
159 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 159 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
160 { | 160 { |
161 RefPtr<TestNode> impl = TestNode::create(); | 161 RefPtr<TestNode> impl = TestNode::create(); |
| 162 |
162 v8::Handle<v8::Object> wrapper = info.Holder(); | 163 v8::Handle<v8::Object> wrapper = info.Holder(); |
163 | |
164 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test
Node::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Depende
nt); | 164 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test
Node::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Depende
nt); |
165 v8SetReturnValue(info, wrapper); | 165 v8SetReturnValue(info, wrapper); |
166 } | 166 } |
167 | 167 |
168 } // namespace TestNodeV8Internal | 168 } // namespace TestNodeV8Internal |
169 | 169 |
170 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] =
{ | 170 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] =
{ |
171 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal
::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 171 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal
::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
172 {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNo
deV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins
tance */}, | 172 {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNo
deV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins
tance */}, |
173 {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, Te
stNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, | 173 {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, Te
stNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 fromInternalPointer(object)->deref(); | 267 fromInternalPointer(object)->deref(); |
268 } | 268 } |
269 | 269 |
270 template<> | 270 template<> |
271 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) | 271 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) |
272 { | 272 { |
273 return toV8(impl, creationContext, isolate); | 273 return toV8(impl, creationContext, isolate); |
274 } | 274 } |
275 | 275 |
276 } // namespace WebCore | 276 } // namespace WebCore |
OLD | NEW |