OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestInterface2.h" | 8 #include "V8TestInterface2.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 227 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
228 { | 228 { |
229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
230 TestInterface2V8Internal::toStringMethod(info); | 230 TestInterface2V8Internal::toStringMethod(info); |
231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
232 } | 232 } |
233 | 233 |
234 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 234 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
235 { | 235 { |
236 RefPtr<TestInterface2> impl = TestInterface2::create(); | 236 RefPtr<TestInterface2> impl = TestInterface2::create(); |
237 v8::Handle<v8::Object> wrapper = info.Holder(); | 237 v8::Local<v8::Object> wrapper = info.Holder(); |
238 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterface2::wrapperType
Info, wrapper); | 238 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterface2::wrapperType
Info, wrapper); |
239 v8SetReturnValue(info, wrapper); | 239 v8SetReturnValue(info, wrapper); |
240 } | 240 } |
241 | 241 |
242 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 242 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
243 { | 243 { |
244 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 244 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
245 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "TestInt
erface2", info.Holder(), info.GetIsolate()); | 245 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "TestInt
erface2", info.Holder(), info.GetIsolate()); |
246 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); | 246 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); |
247 if (exceptionState.throwIfNeeded()) | 247 if (exceptionState.throwIfNeeded()) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 403 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
404 { | 404 { |
405 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 405 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
406 Vector<String> names; | 406 Vector<String> names; |
407 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face2", info.Holder(), info.GetIsolate()); | 407 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face2", info.Holder(), info.GetIsolate()); |
408 impl->namedPropertyEnumerator(names, exceptionState); | 408 impl->namedPropertyEnumerator(names, exceptionState); |
409 if (exceptionState.throwIfNeeded()) | 409 if (exceptionState.throwIfNeeded()) |
410 return; | 410 return; |
411 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); | 411 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
412 for (size_t i = 0; i < names.size(); ++i) | 412 for (size_t i = 0; i < names.size(); ++i) |
413 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); | 413 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); |
414 v8SetReturnValue(info, v8names); | 414 v8SetReturnValue(info, v8names); |
415 } | 415 } |
416 | 416 |
417 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 417 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
418 { | 418 { |
419 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 419 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
420 TestInterface2V8Internal::namedPropertyEnumerator(info); | 420 TestInterface2V8Internal::namedPropertyEnumerator(info); |
421 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 421 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 { | 513 { |
514 scriptWrappable->toImpl<TestInterface2>()->ref(); | 514 scriptWrappable->toImpl<TestInterface2>()->ref(); |
515 } | 515 } |
516 | 516 |
517 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) | 517 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) |
518 { | 518 { |
519 scriptWrappable->toImpl<TestInterface2>()->deref(); | 519 scriptWrappable->toImpl<TestInterface2>()->deref(); |
520 } | 520 } |
521 | 521 |
522 } // namespace blink | 522 } // namespace blink |
OLD | NEW |