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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 6656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6667 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Len
gth()), info.GetIsolate()); | 6667 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Len
gth()), info.GetIsolate()); |
6668 return; | 6668 return; |
6669 } | 6669 } |
6670 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6670 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6671 TestCallbackInterface* testCallbackInterfaceArg; | 6671 TestCallbackInterface* testCallbackInterfaceArg; |
6672 { | 6672 { |
6673 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 6673 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
6674 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The call
back provided as parameter 1 is not a function.")); | 6674 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The call
back provided as parameter 1 is not a function.")); |
6675 return; | 6675 return; |
6676 } | 6676 } |
6677 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 6677 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8:
:Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
6678 } | 6678 } |
6679 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); | 6679 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); |
6680 } | 6680 } |
6681 | 6681 |
6682 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6682 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6683 { | 6683 { |
6684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
6685 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | 6685 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); |
6686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
6687 } | 6687 } |
6688 | 6688 |
6689 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6689 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6690 { | 6690 { |
6691 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6691 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6692 TestCallbackInterface* optionalTestCallbackInterfaceArg; | 6692 TestCallbackInterface* optionalTestCallbackInterfaceArg; |
6693 { | 6693 { |
6694 if (!isUndefinedOrNull(info[0])) { | 6694 if (!isUndefinedOrNull(info[0])) { |
6695 if (!info[0]->IsFunction()) { | 6695 if (!info[0]->IsFunction()) { |
6696 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes
sages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject
", "The callback provided as parameter 1 is not a function.")); | 6696 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes
sages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject
", "The callback provided as parameter 1 is not a function.")); |
6697 return; | 6697 return; |
6698 } | 6698 } |
6699 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 6699 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
6700 } else { | 6700 } else { |
6701 optionalTestCallbackInterfaceArg = nullptr; | 6701 optionalTestCallbackInterfaceArg = nullptr; |
6702 } | 6702 } |
6703 } | 6703 } |
6704 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg); | 6704 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg); |
6705 } | 6705 } |
6706 | 6706 |
6707 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 6707 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
6708 { | 6708 { |
6709 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6709 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
6710 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | 6710 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; |
6711 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6711 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
6712 } | 6712 } |
6713 | 6713 |
6714 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6714 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
6715 { | 6715 { |
6716 if (UNLIKELY(info.Length() < 1)) { | 6716 if (UNLIKELY(info.Length() < 1)) { |
6717 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, in
fo.Length()), info.GetIsolate()); | 6717 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, in
fo.Length()), info.GetIsolate()); |
6718 return; | 6718 return; |
6719 } | 6719 } |
6720 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6720 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6721 TestCallbackInterface* testCallbackInterfaceArg; | 6721 TestCallbackInterface* testCallbackInterfaceArg; |
6722 { | 6722 { |
6723 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ | 6723 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ |
6724 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "Th
e callback provided as parameter 1 is not a function.")); | 6724 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "Th
e callback provided as parameter 1 is not a function.")); |
6725 return; | 6725 return; |
6726 } | 6726 } |
6727 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); | 6727 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(in
fo.GetIsolate())); |
6728 } | 6728 } |
6729 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); | 6729 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); |
6730 } | 6730 } |
6731 | 6731 |
6732 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 6732 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
6733 { | 6733 { |
6734 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6734 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
6735 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); | 6735 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); |
6736 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6736 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
6737 } | 6737 } |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7668 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 7668 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
7669 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7669 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7670 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | 7670 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; |
7671 { | 7671 { |
7672 for (int i = 0; i < info.Length(); ++i) { | 7672 for (int i = 0; i < info.Length(); ++i) { |
7673 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7673 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
7674 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 7674 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
7675 exceptionState.throwIfNeeded(); | 7675 exceptionState.throwIfNeeded(); |
7676 return; | 7676 return; |
7677 } | 7677 } |
7678 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); | 7678 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); |
7679 } | 7679 } |
7680 } | 7680 } |
7681 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | 7681 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); |
7682 } | 7682 } |
7683 | 7683 |
7684 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7684 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7685 { | 7685 { |
7686 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7686 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7687 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | 7687 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); |
7688 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7688 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 11 matching lines...) Expand all Loading... |
7700 TestInterfaceEmpty* testInterfaceEmptyArg; | 7700 TestInterfaceEmpty* testInterfaceEmptyArg; |
7701 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | 7701 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; |
7702 { | 7702 { |
7703 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 7703 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
7704 for (int i = 1; i < info.Length(); ++i) { | 7704 for (int i = 1; i < info.Length(); ++i) { |
7705 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7705 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
7706 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); | 7706 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); |
7707 exceptionState.throwIfNeeded(); | 7707 exceptionState.throwIfNeeded(); |
7708 return; | 7708 return; |
7709 } | 7709 } |
7710 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); | 7710 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); |
7711 } | 7711 } |
7712 } | 7712 } |
7713 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); | 7713 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); |
7714 } | 7714 } |
7715 | 7715 |
7716 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 7716 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
7717 { | 7717 { |
7718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7719 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); | 7719 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); |
7720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7721 } | 7721 } |
7722 | 7722 |
7723 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 7723 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
7724 { | 7724 { |
7725 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetI
solate()); | 7725 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetI
solate()); |
7726 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7726 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7727 HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarb
ageCollectedArg; | 7727 HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarb
ageCollectedArg; |
7728 { | 7728 { |
7729 for (int i = 0; i < info.Length(); ++i) { | 7729 for (int i = 0; i < info.Length(); ++i) { |
7730 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { | 7730 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { |
7731 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceGarbageCollected'."); | 7731 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceGarbageCollected'."); |
7732 exceptionState.throwIfNeeded(); | 7732 exceptionState.throwIfNeeded(); |
7733 return; | 7733 return; |
7734 } | 7734 } |
7735 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); | 7735 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
7736 } | 7736 } |
7737 } | 7737 } |
7738 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); | 7738 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); |
7739 } | 7739 } |
7740 | 7740 |
7741 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 7741 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
7742 { | 7742 { |
7743 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7743 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7744 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); | 7744 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); |
7745 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7745 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7746 } | 7746 } |
7747 | 7747 |
7748 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7748 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
7749 { | 7749 { |
7750 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 7750 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
7751 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7751 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7752 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; | 7752 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; |
7753 { | 7753 { |
7754 for (int i = 0; i < info.Length(); ++i) { | 7754 for (int i = 0; i < info.Length(); ++i) { |
7755 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], inf
o.GetIsolate())) { | 7755 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], inf
o.GetIsolate())) { |
7756 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceWillBeGarbageCollected'."); | 7756 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceWillBeGarbageCollected'."); |
7757 exceptionState.throwIfNeeded(); | 7757 exceptionState.throwIfNeeded(); |
7758 return; | 7758 return; |
7759 } | 7759 } |
7760 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfac
eWillBeGarbageCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); | 7760 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfac
eWillBeGarbageCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
7761 } | 7761 } |
7762 } | 7762 } |
7763 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); | 7763 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); |
7764 } | 7764 } |
7765 | 7765 |
7766 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 7766 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
7767 { | 7767 { |
7768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7769 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); | 7769 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); |
7770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8913 impl->activityLoggingAccessForAllWorldsMethod(); | 8913 impl->activityLoggingAccessForAllWorldsMethod(); |
8914 } | 8914 } |
8915 | 8915 |
8916 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 8916 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
8917 { | 8917 { |
8918 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8918 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8919 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 8919 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
8920 V8PerContextData* contextData = scriptState->perContextData(); | 8920 V8PerContextData* contextData = scriptState->perContextData(); |
8921 if (contextData && contextData->activityLogger()) { | 8921 if (contextData && contextData->activityLogger()) { |
8922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingAccessForAllWorldsMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 8922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingAccessForAllWorldsMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
8923 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0, exceptionState); | 8923 Vector<v8::Local<v8::Value> > loggerArgs = toImplArguments<v8::Local<v8:
:Value> >(info, 0, exceptionState); |
8924 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce
ssForAllWorldsMethod", info.Length(), loggerArgs.data()); | 8924 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce
ssForAllWorldsMethod", info.Length(), loggerArgs.data()); |
8925 } | 8925 } |
8926 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); | 8926 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); |
8927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8928 } | 8928 } |
8929 | 8929 |
8930 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 8930 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
8931 { | 8931 { |
8932 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8932 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8933 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 8933 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9629 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | 9629 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
9630 } | 9630 } |
9631 | 9631 |
9632 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 9632 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
9633 { | 9633 { |
9634 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9634 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9635 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9635 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
9636 V8PerContextData* contextData = scriptState->perContextData(); | 9636 V8PerContextData* contextData = scriptState->perContextData(); |
9637 if (contextData && contextData->activityLogger()) { | 9637 if (contextData && contextData->activityLogger()) { |
9638 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9638 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in
fo.GetIsolate()); |
9639 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0, exceptionState); | 9639 Vector<v8::Local<v8::Value> > loggerArgs = toImplArguments<v8::Local<v8:
:Value> >(info, 0, exceptionState); |
9640 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9640 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
9641 } | 9641 } |
9642 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); | 9642 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); |
9643 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9643 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9644 } | 9644 } |
9645 | 9645 |
9646 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9646 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) |
9647 { | 9647 { |
9648 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9648 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9649 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | 9649 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
9650 } | 9650 } |
9651 | 9651 |
9652 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9652 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
9653 { | 9653 { |
9654 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9654 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9655 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9655 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
9656 V8PerContextData* contextData = scriptState->perContextData(); | 9656 V8PerContextData* contextData = scriptState->perContextData(); |
9657 if (contextData && contextData->activityLogger()) { | 9657 if (contextData && contextData->activityLogger()) { |
9658 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9658 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in
fo.GetIsolate()); |
9659 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0, exceptionState); | 9659 Vector<v8::Local<v8::Value> > loggerArgs = toImplArguments<v8::Local<v8:
:Value> >(info, 0, exceptionState); |
9660 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9660 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
9661 } | 9661 } |
9662 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); | 9662 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); |
9663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9664 } | 9664 } |
9665 | 9665 |
9666 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 9666 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
9667 { | 9667 { |
9668 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9668 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9669 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | 9669 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
9670 } | 9670 } |
9671 | 9671 |
9672 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 9672 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
9673 { | 9673 { |
9674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9675 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9675 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
9676 V8PerContextData* contextData = scriptState->perContextData(); | 9676 V8PerContextData* contextData = scriptState->perContextData(); |
9677 if (contextData && contextData->activityLogger()) { | 9677 if (contextData && contextData->activityLogger()) { |
9678 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(
), info.GetIsolate()); | 9678 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit
yLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(
), info.GetIsolate()); |
9679 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0, exceptionState); | 9679 Vector<v8::Local<v8::Value> > loggerArgs = toImplArguments<v8::Local<v8:
:Value> >(info, 0, exceptionState); |
9680 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI
solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9680 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI
solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
9681 } | 9681 } |
9682 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); | 9682 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); |
9683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9684 } | 9684 } |
9685 | 9685 |
9686 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9686 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
9687 { | 9687 { |
9688 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9688 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9689 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | 9689 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9772 return; | 9772 return; |
9773 } | 9773 } |
9774 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9774 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9775 TestCallbackInterface* testCallbackInterfaceArg; | 9775 TestCallbackInterface* testCallbackInterfaceArg; |
9776 { | 9776 { |
9777 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 9777 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
9778 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 9778 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
9779 exceptionState.throwIfNeeded(); | 9779 exceptionState.throwIfNeeded(); |
9780 return; | 9780 return; |
9781 } | 9781 } |
9782 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 9782 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8:
:Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
9783 } | 9783 } |
9784 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg, exceptionState); | 9784 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg, exceptionState); |
9785 if (exceptionState.hadException()) { | 9785 if (exceptionState.hadException()) { |
9786 exceptionState.throwIfNeeded(); | 9786 exceptionState.throwIfNeeded(); |
9787 return; | 9787 return; |
9788 } | 9788 } |
9789 } | 9789 } |
9790 | 9790 |
9791 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9791 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
9792 { | 9792 { |
9793 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9793 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9794 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 9794 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
9795 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9795 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9796 } | 9796 } |
9797 | 9797 |
9798 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9798 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
9799 { | 9799 { |
9800 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9800 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
9801 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9801 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9802 TestCallbackInterface* optionalTestCallbackInterfaceArg; | 9802 TestCallbackInterface* optionalTestCallbackInterfaceArg; |
9803 { | 9803 { |
9804 if (!isUndefinedOrNull(info[0])) { | 9804 if (!isUndefinedOrNull(info[0])) { |
9805 if (!info[0]->IsFunction()) { | 9805 if (!info[0]->IsFunction()) { |
9806 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | 9806 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); |
9807 exceptionState.throwIfNeeded(); | 9807 exceptionState.throwIfNeeded(); |
9808 return; | 9808 return; |
9809 } | 9809 } |
9810 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 9810 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
9811 } else { | 9811 } else { |
9812 optionalTestCallbackInterfaceArg = nullptr; | 9812 optionalTestCallbackInterfaceArg = nullptr; |
9813 } | 9813 } |
9814 } | 9814 } |
9815 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg, exceptionState); | 9815 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg, exceptionState); |
9816 if (exceptionState.hadException()) { | 9816 if (exceptionState.hadException()) { |
9817 exceptionState.throwIfNeeded(); | 9817 exceptionState.throwIfNeeded(); |
9818 return; | 9818 return; |
9819 } | 9819 } |
9820 } | 9820 } |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "typeCheckin
gInterfaceVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Holder(),
info.GetIsolate()); | 10165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "typeCheckin
gInterfaceVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Holder(),
info.GetIsolate()); |
10166 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10166 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10167 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyArg; | 10167 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyArg; |
10168 { | 10168 { |
10169 for (int i = 0; i < info.Length(); ++i) { | 10169 for (int i = 0; i < info.Length(); ++i) { |
10170 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 10170 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
10171 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 10171 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
10172 exceptionState.throwIfNeeded(); | 10172 exceptionState.throwIfNeeded(); |
10173 return; | 10173 return; |
10174 } | 10174 } |
10175 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Handle
<v8::Object>::Cast(info[i]))); | 10175 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<
v8::Object>::Cast(info[i]))); |
10176 } | 10176 } |
10177 } | 10177 } |
10178 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(testInter
faceEmptyArg); | 10178 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(testInter
faceEmptyArg); |
10179 } | 10179 } |
10180 | 10180 |
10181 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10181 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
10182 { | 10182 { |
10183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10184 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria
dicArgMethod(info); | 10184 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria
dicArgMethod(info); |
10185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11119 | 11119 |
11120 // Custom toString template | 11120 // Custom toString template |
11121 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 11121 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
11122 } | 11122 } |
11123 | 11123 |
11124 v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) | 11124 v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) |
11125 { | 11125 { |
11126 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestObjectTemplate); | 11126 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestObjectTemplate); |
11127 } | 11127 } |
11128 | 11128 |
11129 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola
te) | 11129 bool V8TestObject::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolat
e) |
11130 { | 11130 { |
11131 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 11131 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
11132 } | 11132 } |
11133 | 11133 |
11134 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> v8Value, v8::Isolate* isolate) | 11134 v8::Local<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Local<v8::V
alue> v8Value, v8::Isolate* isolate) |
11135 { | 11135 { |
11136 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 11136 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
11137 } | 11137 } |
11138 | 11138 |
11139 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v
8::Value> value) | 11139 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8
::Value> value) |
11140 { | 11140 { |
11141 return hasInstance(value, isolate) ? toImpl(v8::Handle<v8::Object>::Cast(val
ue)) : 0; | 11141 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
11142 } | 11142 } |
11143 | 11143 |
11144 void V8TestObject::installConditionallyEnabledProperties(v8::Local<v8::Object> i
nstanceObject, v8::Isolate* isolate) | 11144 void V8TestObject::installConditionallyEnabledProperties(v8::Local<v8::Object> i
nstanceObject, v8::Isolate* isolate) |
11145 { | 11145 { |
11146 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); | 11146 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); |
11147 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 11147 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
11148 | 11148 |
11149 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | 11149 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { |
11150 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 11150 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
11151 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl
edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL
ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnInstance}; | 11151 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl
edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL
ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnInstance}; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11644 return false; | 11644 return false; |
11645 | 11645 |
11646 ScriptState::Scope scope(scriptState); | 11646 ScriptState::Scope scope(scriptState); |
11647 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11647 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11648 | 11648 |
11649 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11649 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11650 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11650 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11651 } | 11651 } |
11652 | 11652 |
11653 } // namespace blink | 11653 } // namespace blink |
OLD | NEW |