| 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 4873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4884 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4884 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4885 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); | 4885 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); |
| 4886 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4886 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4887 } | 4887 } |
| 4888 | 4888 |
| 4889 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 4889 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 4890 { | 4890 { |
| 4891 v8::Handle<v8::Object> holder = info.Holder(); | 4891 v8::Handle<v8::Object> holder = info.Holder(); |
| 4892 TestObject* impl = V8TestObject::toNative(holder); | 4892 TestObject* impl = V8TestObject::toNative(holder); |
| 4893 int result = 0; | 4893 int result = 0; |
| 4894 if (!V8TestObject::readonlyShortAttributeAttributeGetterImplementedInPrivate
Script(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &resu
lt)) | 4894 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4895 return; | 4895 return; |
| 4896 v8SetReturnValueInt(info, result); | 4896 v8SetReturnValueInt(info, result); |
| 4897 } | 4897 } |
| 4898 | 4898 |
| 4899 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 4899 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4900 { | 4900 { |
| 4901 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4901 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4902 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); | 4902 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); |
| 4903 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4903 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4904 } | 4904 } |
| 4905 | 4905 |
| 4906 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 4906 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 4907 { | 4907 { |
| 4908 v8::Handle<v8::Object> holder = info.Holder(); | 4908 v8::Handle<v8::Object> holder = info.Holder(); |
| 4909 TestObject* impl = V8TestObject::toNative(holder); | 4909 TestObject* impl = V8TestObject::toNative(holder); |
| 4910 int result = 0; | 4910 int result = 0; |
| 4911 if (!V8TestObject::shortAttributeAttributeGetterImplementedInPrivateScript(t
oFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4911 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toFrameIfNot
Detached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4912 return; | 4912 return; |
| 4913 v8SetReturnValueInt(info, result); | 4913 v8SetReturnValueInt(info, result); |
| 4914 } | 4914 } |
| 4915 | 4915 |
| 4916 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 4916 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 4917 { | 4917 { |
| 4918 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4918 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4919 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 4919 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
| 4920 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4920 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4921 } | 4921 } |
| 4922 | 4922 |
| 4923 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 4923 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 4924 { | 4924 { |
| 4925 v8::Handle<v8::Object> holder = info.Holder(); | 4925 v8::Handle<v8::Object> holder = info.Holder(); |
| 4926 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 4926 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
| 4927 TestObject* impl = V8TestObject::toNative(holder); | 4927 TestObject* impl = V8TestObject::toNative(holder); |
| 4928 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); | 4928 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); |
| 4929 V8TestObject::shortAttributeAttributeSetterImplementedInPrivateScript(toFram
eIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4929 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toFrameIfNotDetac
hed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4930 } | 4930 } |
| 4931 | 4931 |
| 4932 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4932 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4933 { | 4933 { |
| 4934 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4934 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4935 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 4935 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| 4936 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4936 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4937 } | 4937 } |
| 4938 | 4938 |
| 4939 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 4939 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 4940 { | 4940 { |
| 4941 v8::Handle<v8::Object> holder = info.Holder(); | 4941 v8::Handle<v8::Object> holder = info.Holder(); |
| 4942 TestObject* impl = V8TestObject::toNative(holder); | 4942 TestObject* impl = V8TestObject::toNative(holder); |
| 4943 String result; | 4943 String result; |
| 4944 if (!V8TestObject::stringAttributeAttributeGetterImplementedInPrivateScript(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4944 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4945 return; | 4945 return; |
| 4946 v8SetReturnValueString(info, result, info.GetIsolate()); | 4946 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 4947 } | 4947 } |
| 4948 | 4948 |
| 4949 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 4949 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 4950 { | 4950 { |
| 4951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4952 TestObjectV8Internal::stringAttributeAttributeGetter(info); | 4952 TestObjectV8Internal::stringAttributeAttributeGetter(info); |
| 4953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4954 } | 4954 } |
| 4955 | 4955 |
| 4956 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 4956 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 4957 { | 4957 { |
| 4958 v8::Handle<v8::Object> holder = info.Holder(); | 4958 v8::Handle<v8::Object> holder = info.Holder(); |
| 4959 TestObject* impl = V8TestObject::toNative(holder); | 4959 TestObject* impl = V8TestObject::toNative(holder); |
| 4960 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4960 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4961 V8TestObject::stringAttributeAttributeSetterImplementedInPrivateScript(toFra
meIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4961 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotDeta
ched(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4962 } | 4962 } |
| 4963 | 4963 |
| 4964 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4964 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4965 { | 4965 { |
| 4966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4967 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 4967 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 4968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4969 } | 4969 } |
| 4970 | 4970 |
| 4971 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 4971 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 4972 { | 4972 { |
| 4973 v8::Handle<v8::Object> holder = info.Holder(); | 4973 v8::Handle<v8::Object> holder = info.Holder(); |
| 4974 TestObject* impl = V8TestObject::toNative(holder); | 4974 TestObject* impl = V8TestObject::toNative(holder); |
| 4975 RefPtrWillBeRawPtr<Node> result; | 4975 RefPtrWillBeRawPtr<Node> result; |
| 4976 if (!V8TestObject::nodeAttributeAttributeGetterImplementedInPrivateScript(to
FrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4976 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toFrameIfNotD
etached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4977 return; | 4977 return; |
| 4978 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | 4978 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
| 4979 } | 4979 } |
| 4980 | 4980 |
| 4981 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 4981 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4982 { | 4982 { |
| 4983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4984 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 4984 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 4985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4986 } | 4986 } |
| 4987 | 4987 |
| 4988 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 4988 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 4989 { | 4989 { |
| 4990 v8::Handle<v8::Object> holder = info.Holder(); | 4990 v8::Handle<v8::Object> holder = info.Holder(); |
| 4991 TestObject* impl = V8TestObject::toNative(holder); | 4991 TestObject* impl = V8TestObject::toNative(holder); |
| 4992 TONATIVE_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate
(), v8Value)); | 4992 TONATIVE_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate
(), v8Value)); |
| 4993 V8TestObject::nodeAttributeAttributeSetterImplementedInPrivateScript(toFrame
IfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4993 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toFrameIfNotDetach
ed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4994 } | 4994 } |
| 4995 | 4995 |
| 4996 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4996 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4997 { | 4997 { |
| 4998 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4998 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4999 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 4999 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 5000 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5000 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5001 } | 5001 } |
| 5002 | 5002 |
| 5003 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 5003 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 4904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9908 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 9908 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9909 { | 9909 { |
| 9910 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9910 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9911 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); | 9911 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); |
| 9912 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9912 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9913 } | 9913 } |
| 9914 | 9914 |
| 9915 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 9915 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 9916 { | 9916 { |
| 9917 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9917 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 9918 V8TestObject::voidMethodImplementedInPrivateScriptMethodImplementedInPrivate
Script(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); | 9918 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); |
| 9919 } | 9919 } |
| 9920 | 9920 |
| 9921 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9921 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9922 { | 9922 { |
| 9923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9924 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); | 9924 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); |
| 9925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9926 } | 9926 } |
| 9927 | 9927 |
| 9928 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 9928 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 9929 { | 9929 { |
| 9930 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9930 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 9931 int result = 0; | 9931 int result = 0; |
| 9932 if (!V8TestObject::shortMethodImplementedInPrivateScriptMethodImplementedInP
rivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl,
&result)) | 9932 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho
d(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 9933 return; | 9933 return; |
| 9934 v8SetReturnValueInt(info, result); | 9934 v8SetReturnValueInt(info, result); |
| 9935 } | 9935 } |
| 9936 | 9936 |
| 9937 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9937 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 9938 { | 9938 { |
| 9939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9940 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); | 9940 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); |
| 9941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9942 } | 9942 } |
| 9943 | 9943 |
| 9944 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 9944 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 9945 { | 9945 { |
| 9946 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); | 9946 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); |
| 9947 if (UNLIKELY(info.Length() < 1)) { | 9947 if (UNLIKELY(info.Length() < 1)) { |
| 9948 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 9948 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 9949 return; | 9949 return; |
| 9950 } | 9950 } |
| 9951 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9951 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 9952 int value; | 9952 int value; |
| 9953 { | 9953 { |
| 9954 v8::TryCatch block; | 9954 v8::TryCatch block; |
| 9955 V8RethrowTryCatchScope rethrow(block); | 9955 V8RethrowTryCatchScope rethrow(block); |
| 9956 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); | 9956 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); |
| 9957 } | 9957 } |
| 9958 int result = 0; | 9958 int result = 0; |
| 9959 if (!V8TestObject::shortMethodWithShortArgumentImplementedInPrivateScriptMet
hodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrent
Context()), impl, value, &result)) | 9959 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()),
impl, value, &result)) |
| 9960 return; | 9960 return; |
| 9961 v8SetReturnValueInt(info, result); | 9961 v8SetReturnValueInt(info, result); |
| 9962 } | 9962 } |
| 9963 | 9963 |
| 9964 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 9964 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9965 { | 9965 { |
| 9966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9967 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript
Method(info); | 9967 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript
Method(info); |
| 9968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9969 } | 9969 } |
| 9970 | 9970 |
| 9971 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9971 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 9972 { | 9972 { |
| 9973 if (UNLIKELY(info.Length() < 1)) { | 9973 if (UNLIKELY(info.Length() < 1)) { |
| 9974 throwMinimumArityTypeErrorForMethod("stringMethodWithStringArgumentImple
mentedInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); | 9974 throwMinimumArityTypeErrorForMethod("stringMethodWithStringArgumentImple
mentedInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); |
| 9975 return; | 9975 return; |
| 9976 } | 9976 } |
| 9977 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9977 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 9978 V8StringResource<> value; | 9978 V8StringResource<> value; |
| 9979 { | 9979 { |
| 9980 TOSTRING_VOID_INTERNAL(value, info[0]); | 9980 TOSTRING_VOID_INTERNAL(value, info[0]); |
| 9981 } | 9981 } |
| 9982 String result; | 9982 String result; |
| 9983 if (!V8TestObject::stringMethodWithStringArgumentImplementedInPrivateScriptM
ethodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurre
ntContext()), impl, value, &result)) | 9983 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, value, &result)) |
| 9984 return; | 9984 return; |
| 9985 v8SetReturnValueString(info, result, info.GetIsolate()); | 9985 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 9986 } | 9986 } |
| 9987 | 9987 |
| 9988 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 9988 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9989 { | 9989 { |
| 9990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9991 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri
ptMethod(info); | 9991 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri
ptMethod(info); |
| 9992 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9992 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9993 } | 9993 } |
| 9994 | 9994 |
| 9995 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 9995 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 9996 { | 9996 { |
| 9997 if (UNLIKELY(info.Length() < 1)) { | 9997 if (UNLIKELY(info.Length() < 1)) { |
| 9998 throwMinimumArityTypeErrorForMethod("nodeMethodWithNodeArgumentImplement
edInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); | 9998 throwMinimumArityTypeErrorForMethod("nodeMethodWithNodeArgumentImplement
edInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); |
| 9999 return; | 9999 return; |
| 10000 } | 10000 } |
| 10001 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10001 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 10002 Node* value; | 10002 Node* value; |
| 10003 { | 10003 { |
| 10004 v8::TryCatch block; | 10004 v8::TryCatch block; |
| 10005 V8RethrowTryCatchScope rethrow(block); | 10005 V8RethrowTryCatchScope rethrow(block); |
| 10006 TONATIVE_VOID_INTERNAL(value, V8Node::toNativeWithTypeCheck(info.GetIsol
ate(), info[0])); | 10006 TONATIVE_VOID_INTERNAL(value, V8Node::toNativeWithTypeCheck(info.GetIsol
ate(), info[0])); |
| 10007 } | 10007 } |
| 10008 RefPtrWillBeRawPtr<Node> result; | 10008 RefPtrWillBeRawPtr<Node> result; |
| 10009 if (!V8TestObject::nodeMethodWithNodeArgumentImplementedInPrivateScriptMetho
dImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurrentCo
ntext()), impl, value, &result)) | 10009 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i
mpl, value, &result)) |
| 10010 return; | 10010 return; |
| 10011 v8SetReturnValue(info, result.release()); | 10011 v8SetReturnValue(info, result.release()); |
| 10012 } | 10012 } |
| 10013 | 10013 |
| 10014 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 10014 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10015 { | 10015 { |
| 10016 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10016 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10017 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); | 10017 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); |
| 10018 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10018 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10019 } | 10019 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 10034 { | 10034 { |
| 10035 v8::TryCatch block; | 10035 v8::TryCatch block; |
| 10036 V8RethrowTryCatchScope rethrow(block); | 10036 V8RethrowTryCatchScope rethrow(block); |
| 10037 TONATIVE_VOID_INTERNAL(document, V8Document::toNativeWithTypeCheck(info.
GetIsolate(), info[0])); | 10037 TONATIVE_VOID_INTERNAL(document, V8Document::toNativeWithTypeCheck(info.
GetIsolate(), info[0])); |
| 10038 TONATIVE_VOID_INTERNAL(node, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), info[1])); | 10038 TONATIVE_VOID_INTERNAL(node, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), info[1])); |
| 10039 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[2], exception
State), exceptionState); | 10039 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[2], exception
State), exceptionState); |
| 10040 TONATIVE_VOID_INTERNAL(value2, static_cast<double>(info[3]->NumberValue(
))); | 10040 TONATIVE_VOID_INTERNAL(value2, static_cast<double>(info[3]->NumberValue(
))); |
| 10041 TOSTRING_VOID_INTERNAL(string, info[4]); | 10041 TOSTRING_VOID_INTERNAL(string, info[4]); |
| 10042 } | 10042 } |
| 10043 RefPtrWillBeRawPtr<Node> result; | 10043 RefPtrWillBeRawPtr<Node> result; |
| 10044 if (!V8TestObject::nodeMethodWithVariousArgumentsImplementedInPrivateScriptM
ethodImplementedInPrivateScript(toFrameIfNotDetached(info.GetIsolate()->GetCurre
ntContext()), impl, document, node, value1, value2, string, &result)) | 10044 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, document, node, value1, value2, string, &result)) |
| 10045 return; | 10045 return; |
| 10046 v8SetReturnValue(info, result.release()); | 10046 v8SetReturnValue(info, result.release()); |
| 10047 } | 10047 } |
| 10048 | 10048 |
| 10049 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10049 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10050 { | 10050 { |
| 10051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10052 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); | 10052 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); |
| 10053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10054 } | 10054 } |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10675 { | 10675 { |
| 10676 fromInternalPointer(object)->deref(); | 10676 fromInternalPointer(object)->deref(); |
| 10677 } | 10677 } |
| 10678 | 10678 |
| 10679 template<> | 10679 template<> |
| 10680 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 10680 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
| 10681 { | 10681 { |
| 10682 return toV8(impl, creationContext, isolate); | 10682 return toV8(impl, creationContext, isolate); |
| 10683 } | 10683 } |
| 10684 | 10684 |
| 10685 bool V8TestObject::voidMethodImplementedInPrivateScriptMethodImplementedInPrivat
eScript(LocalFrame* frame, TestObject* holderImpl) | 10685 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc
alFrame* frame, TestObject* holderImpl) |
| 10686 { | 10686 { |
| 10687 if (!frame) | 10687 if (!frame) |
| 10688 return false; | 10688 return false; |
| 10689 v8::HandleScope handleScope(toIsolate(frame)); | 10689 v8::HandleScope handleScope(toIsolate(frame)); |
| 10690 ScriptForbiddenScope::AllowUserAgentScript script; | 10690 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10691 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10691 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10692 if (context.IsEmpty()) | 10692 if (context.IsEmpty()) |
| 10693 return false; | 10693 return false; |
| 10694 ScriptState* scriptState = ScriptState::from(context); | 10694 ScriptState* scriptState = ScriptState::from(context); |
| 10695 if (!scriptState->executionContext()) | 10695 if (!scriptState->executionContext()) |
| 10696 return false; | 10696 return false; |
| 10697 | 10697 |
| 10698 ScriptState::Scope scope(scriptState); | 10698 ScriptState::Scope scope(scriptState); |
| 10699 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 10699 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 10700 | 10700 |
| 10701 v8::Handle<v8::Value> *argv = 0; | 10701 v8::Handle<v8::Value> *argv = 0; |
| 10702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); | 10702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); |
| 10703 v8::TryCatch block; | 10703 v8::TryCatch block; |
| 10704 V8RethrowTryCatchScope rethrow(block); | 10704 V8RethrowTryCatchScope rethrow(block); |
| 10705 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); | 10705 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); |
| 10706 if (block.HasCaught()) { | 10706 if (block.HasCaught()) { |
| 10707 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); | 10707 PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scriptStat
e->isolate(), exceptionState, block.Exception()); |
| 10708 return false; | 10708 return false; |
| 10709 } | 10709 } |
| 10710 return true; | 10710 return true; |
| 10711 } | 10711 } |
| 10712 | 10712 |
| 10713 bool V8TestObject::shortMethodImplementedInPrivateScriptMethodImplementedInPriva
teScript(LocalFrame* frame, TestObject* holderImpl, int* result) | 10713 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) |
| 10714 { | 10714 { |
| 10715 if (!frame) | 10715 if (!frame) |
| 10716 return false; | 10716 return false; |
| 10717 v8::HandleScope handleScope(toIsolate(frame)); | 10717 v8::HandleScope handleScope(toIsolate(frame)); |
| 10718 ScriptForbiddenScope::AllowUserAgentScript script; | 10718 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10719 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10719 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10720 if (context.IsEmpty()) | 10720 if (context.IsEmpty()) |
| 10721 return false; | 10721 return false; |
| 10722 ScriptState* scriptState = ScriptState::from(context); | 10722 ScriptState* scriptState = ScriptState::from(context); |
| 10723 if (!scriptState->executionContext()) | 10723 if (!scriptState->executionContext()) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10737 RELEASE_ASSERT_NOT_REACHED(); | 10737 RELEASE_ASSERT_NOT_REACHED(); |
| 10738 } | 10738 } |
| 10739 return false; | 10739 return false; |
| 10740 } | 10740 } |
| 10741 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10741 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
| 10742 RELEASE_ASSERT(!exceptionState.hadException()); | 10742 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10743 *result = cppValue; | 10743 *result = cppValue; |
| 10744 return true; | 10744 return true; |
| 10745 } | 10745 } |
| 10746 | 10746 |
| 10747 bool V8TestObject::shortMethodWithShortArgumentImplementedInPrivateScriptMethodI
mplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, int value,
int* result) | 10747 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva
teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result
) |
| 10748 { | 10748 { |
| 10749 if (!frame) | 10749 if (!frame) |
| 10750 return false; | 10750 return false; |
| 10751 v8::HandleScope handleScope(toIsolate(frame)); | 10751 v8::HandleScope handleScope(toIsolate(frame)); |
| 10752 ScriptForbiddenScope::AllowUserAgentScript script; | 10752 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10753 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10753 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10754 if (context.IsEmpty()) | 10754 if (context.IsEmpty()) |
| 10755 return false; | 10755 return false; |
| 10756 ScriptState* scriptState = ScriptState::from(context); | 10756 ScriptState* scriptState = ScriptState::from(context); |
| 10757 if (!scriptState->executionContext()) | 10757 if (!scriptState->executionContext()) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 10772 RELEASE_ASSERT_NOT_REACHED(); | 10772 RELEASE_ASSERT_NOT_REACHED(); |
| 10773 } | 10773 } |
| 10774 return false; | 10774 return false; |
| 10775 } | 10775 } |
| 10776 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10776 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
| 10777 RELEASE_ASSERT(!exceptionState.hadException()); | 10777 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10778 *result = cppValue; | 10778 *result = cppValue; |
| 10779 return true; | 10779 return true; |
| 10780 } | 10780 } |
| 10781 | 10781 |
| 10782 bool V8TestObject::stringMethodWithStringArgumentImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, String va
lue, String* result) | 10782 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String
* result) |
| 10783 { | 10783 { |
| 10784 if (!frame) | 10784 if (!frame) |
| 10785 return false; | 10785 return false; |
| 10786 v8::HandleScope handleScope(toIsolate(frame)); | 10786 v8::HandleScope handleScope(toIsolate(frame)); |
| 10787 ScriptForbiddenScope::AllowUserAgentScript script; | 10787 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10788 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10788 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10789 if (context.IsEmpty()) | 10789 if (context.IsEmpty()) |
| 10790 return false; | 10790 return false; |
| 10791 ScriptState* scriptState = ScriptState::from(context); | 10791 ScriptState* scriptState = ScriptState::from(context); |
| 10792 if (!scriptState->executionContext()) | 10792 if (!scriptState->executionContext()) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 10807 RELEASE_ASSERT_NOT_REACHED(); | 10807 RELEASE_ASSERT_NOT_REACHED(); |
| 10808 } | 10808 } |
| 10809 return false; | 10809 return false; |
| 10810 } | 10810 } |
| 10811 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 10811 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
| 10812 RELEASE_ASSERT(!exceptionState.hadException()); | 10812 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10813 *result = cppValue; | 10813 *result = cppValue; |
| 10814 return true; | 10814 return true; |
| 10815 } | 10815 } |
| 10816 | 10816 |
| 10817 bool V8TestObject::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodImp
lementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWil
lBeRawPtr<Node> value, RefPtrWillBeRawPtr<Node>* result) | 10817 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate
ScriptMethod(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<N
ode> value, RefPtrWillBeRawPtr<Node>* result) |
| 10818 { | 10818 { |
| 10819 if (!frame) | 10819 if (!frame) |
| 10820 return false; | 10820 return false; |
| 10821 v8::HandleScope handleScope(toIsolate(frame)); | 10821 v8::HandleScope handleScope(toIsolate(frame)); |
| 10822 ScriptForbiddenScope::AllowUserAgentScript script; | 10822 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10823 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10823 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10824 if (context.IsEmpty()) | 10824 if (context.IsEmpty()) |
| 10825 return false; | 10825 return false; |
| 10826 ScriptState* scriptState = ScriptState::from(context); | 10826 ScriptState* scriptState = ScriptState::from(context); |
| 10827 if (!scriptState->executionContext()) | 10827 if (!scriptState->executionContext()) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 10842 RELEASE_ASSERT_NOT_REACHED(); | 10842 RELEASE_ASSERT_NOT_REACHED(); |
| 10843 } | 10843 } |
| 10844 return false; | 10844 return false; |
| 10845 } | 10845 } |
| 10846 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10846 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
| 10847 RELEASE_ASSERT(!exceptionState.hadException()); | 10847 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10848 *result = cppValue; | 10848 *result = cppValue; |
| 10849 return true; | 10849 return true; |
| 10850 } | 10850 } |
| 10851 | 10851 |
| 10852 bool V8TestObject::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMetho
dImplementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPt
rWillBeRawPtr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1,
double value2, String string, RefPtrWillBeRawPtr<Node>* result) | 10852 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawP
tr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1, double val
ue2, String string, RefPtrWillBeRawPtr<Node>* result) |
| 10853 { | 10853 { |
| 10854 if (!frame) | 10854 if (!frame) |
| 10855 return false; | 10855 return false; |
| 10856 v8::HandleScope handleScope(toIsolate(frame)); | 10856 v8::HandleScope handleScope(toIsolate(frame)); |
| 10857 ScriptForbiddenScope::AllowUserAgentScript script; | 10857 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10858 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10858 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10859 if (context.IsEmpty()) | 10859 if (context.IsEmpty()) |
| 10860 return false; | 10860 return false; |
| 10861 ScriptState* scriptState = ScriptState::from(context); | 10861 ScriptState* scriptState = ScriptState::from(context); |
| 10862 if (!scriptState->executionContext()) | 10862 if (!scriptState->executionContext()) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 10881 RELEASE_ASSERT_NOT_REACHED(); | 10881 RELEASE_ASSERT_NOT_REACHED(); |
| 10882 } | 10882 } |
| 10883 return false; | 10883 return false; |
| 10884 } | 10884 } |
| 10885 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 10885 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
| 10886 RELEASE_ASSERT(!exceptionState.hadException()); | 10886 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10887 *result = cppValue; | 10887 *result = cppValue; |
| 10888 return true; | 10888 return true; |
| 10889 } | 10889 } |
| 10890 | 10890 |
| 10891 bool V8TestObject::methodForPrivateScriptOnlyMethodImplementedInPrivateScript(Lo
calFrame* frame, TestObject* holderImpl, int value1, int value2, int* result) | 10891 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f
rame, TestObject* holderImpl, int value1, int value2, int* result) |
| 10892 { | 10892 { |
| 10893 if (!frame) | 10893 if (!frame) |
| 10894 return false; | 10894 return false; |
| 10895 v8::HandleScope handleScope(toIsolate(frame)); | 10895 v8::HandleScope handleScope(toIsolate(frame)); |
| 10896 ScriptForbiddenScope::AllowUserAgentScript script; | 10896 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10897 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10897 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10898 if (context.IsEmpty()) | 10898 if (context.IsEmpty()) |
| 10899 return false; | 10899 return false; |
| 10900 ScriptState* scriptState = ScriptState::from(context); | 10900 ScriptState* scriptState = ScriptState::from(context); |
| 10901 if (!scriptState->executionContext()) | 10901 if (!scriptState->executionContext()) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 10917 RELEASE_ASSERT_NOT_REACHED(); | 10917 RELEASE_ASSERT_NOT_REACHED(); |
| 10918 } | 10918 } |
| 10919 return false; | 10919 return false; |
| 10920 } | 10920 } |
| 10921 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10921 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
| 10922 RELEASE_ASSERT(!exceptionState.hadException()); | 10922 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10923 *result = cppValue; | 10923 *result = cppValue; |
| 10924 return true; | 10924 return true; |
| 10925 } | 10925 } |
| 10926 | 10926 |
| 10927 bool V8TestObject::readonlyShortAttributeAttributeGetterImplementedInPrivateScri
pt(LocalFrame* frame, TestObject* holderImpl, int* result) | 10927 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra
me* frame, TestObject* holderImpl, int* result) |
| 10928 { | 10928 { |
| 10929 if (!frame) | 10929 if (!frame) |
| 10930 return false; | 10930 return false; |
| 10931 v8::HandleScope handleScope(toIsolate(frame)); | 10931 v8::HandleScope handleScope(toIsolate(frame)); |
| 10932 ScriptForbiddenScope::AllowUserAgentScript script; | 10932 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10933 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10933 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10934 if (context.IsEmpty()) | 10934 if (context.IsEmpty()) |
| 10935 return false; | 10935 return false; |
| 10936 ScriptState* scriptState = ScriptState::from(context); | 10936 ScriptState* scriptState = ScriptState::from(context); |
| 10937 if (!scriptState->executionContext()) | 10937 if (!scriptState->executionContext()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 10950 RELEASE_ASSERT_NOT_REACHED(); | 10950 RELEASE_ASSERT_NOT_REACHED(); |
| 10951 } | 10951 } |
| 10952 return false; | 10952 return false; |
| 10953 } | 10953 } |
| 10954 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10954 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
| 10955 RELEASE_ASSERT(!exceptionState.hadException()); | 10955 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10956 *result = cppValue; | 10956 *result = cppValue; |
| 10957 return true; | 10957 return true; |
| 10958 } | 10958 } |
| 10959 | 10959 |
| 10960 bool V8TestObject::shortAttributeAttributeGetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int* result) | 10960 bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* fram
e, TestObject* holderImpl, int* result) |
| 10961 { | 10961 { |
| 10962 if (!frame) | 10962 if (!frame) |
| 10963 return false; | 10963 return false; |
| 10964 v8::HandleScope handleScope(toIsolate(frame)); | 10964 v8::HandleScope handleScope(toIsolate(frame)); |
| 10965 ScriptForbiddenScope::AllowUserAgentScript script; | 10965 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10966 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10966 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 10967 if (context.IsEmpty()) | 10967 if (context.IsEmpty()) |
| 10968 return false; | 10968 return false; |
| 10969 ScriptState* scriptState = ScriptState::from(context); | 10969 ScriptState* scriptState = ScriptState::from(context); |
| 10970 if (!scriptState->executionContext()) | 10970 if (!scriptState->executionContext()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 10983 RELEASE_ASSERT_NOT_REACHED(); | 10983 RELEASE_ASSERT_NOT_REACHED(); |
| 10984 } | 10984 } |
| 10985 return false; | 10985 return false; |
| 10986 } | 10986 } |
| 10987 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 10987 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); |
| 10988 RELEASE_ASSERT(!exceptionState.hadException()); | 10988 RELEASE_ASSERT(!exceptionState.hadException()); |
| 10989 *result = cppValue; | 10989 *result = cppValue; |
| 10990 return true; | 10990 return true; |
| 10991 } | 10991 } |
| 10992 | 10992 |
| 10993 bool V8TestObject::shortAttributeAttributeSetterImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int cppValue) | 10993 bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* fram
e, TestObject* holderImpl, int cppValue) |
| 10994 { | 10994 { |
| 10995 if (!frame) | 10995 if (!frame) |
| 10996 return false; | 10996 return false; |
| 10997 v8::HandleScope handleScope(toIsolate(frame)); | 10997 v8::HandleScope handleScope(toIsolate(frame)); |
| 10998 ScriptForbiddenScope::AllowUserAgentScript script; | 10998 ScriptForbiddenScope::AllowUserAgentScript script; |
| 10999 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 10999 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11000 if (context.IsEmpty()) | 11000 if (context.IsEmpty()) |
| 11001 return false; | 11001 return false; |
| 11002 ScriptState* scriptState = ScriptState::from(context); | 11002 ScriptState* scriptState = ScriptState::from(context); |
| 11003 if (!scriptState->executionContext()) | 11003 if (!scriptState->executionContext()) |
| 11004 return false; | 11004 return false; |
| 11005 | 11005 |
| 11006 ScriptState::Scope scope(scriptState); | 11006 ScriptState::Scope scope(scriptState); |
| 11007 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11007 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11008 | 11008 |
| 11009 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11009 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| 11010 v8::TryCatch block; | 11010 v8::TryCatch block; |
| 11011 V8RethrowTryCatchScope rethrow(block); | 11011 V8RethrowTryCatchScope rethrow(block); |
| 11012 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); | 11012 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); |
| 11013 if (block.HasCaught()) { | 11013 if (block.HasCaught()) { |
| 11014 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11014 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
| 11015 // FIXME: We should support exceptions other than DOM exceptions. | 11015 // FIXME: We should support exceptions other than DOM exceptions. |
| 11016 RELEASE_ASSERT_NOT_REACHED(); | 11016 RELEASE_ASSERT_NOT_REACHED(); |
| 11017 } | 11017 } |
| 11018 return false; | 11018 return false; |
| 11019 } | 11019 } |
| 11020 return true; | 11020 return true; |
| 11021 } | 11021 } |
| 11022 | 11022 |
| 11023 bool V8TestObject::stringAttributeAttributeGetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String* result) | 11023 bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result) |
| 11024 { | 11024 { |
| 11025 if (!frame) | 11025 if (!frame) |
| 11026 return false; | 11026 return false; |
| 11027 v8::HandleScope handleScope(toIsolate(frame)); | 11027 v8::HandleScope handleScope(toIsolate(frame)); |
| 11028 ScriptForbiddenScope::AllowUserAgentScript script; | 11028 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11029 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11029 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11030 if (context.IsEmpty()) | 11030 if (context.IsEmpty()) |
| 11031 return false; | 11031 return false; |
| 11032 ScriptState* scriptState = ScriptState::from(context); | 11032 ScriptState* scriptState = ScriptState::from(context); |
| 11033 if (!scriptState->executionContext()) | 11033 if (!scriptState->executionContext()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 11046 RELEASE_ASSERT_NOT_REACHED(); | 11046 RELEASE_ASSERT_NOT_REACHED(); |
| 11047 } | 11047 } |
| 11048 return false; | 11048 return false; |
| 11049 } | 11049 } |
| 11050 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11050 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
| 11051 RELEASE_ASSERT(!exceptionState.hadException()); | 11051 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11052 *result = cppValue; | 11052 *result = cppValue; |
| 11053 return true; | 11053 return true; |
| 11054 } | 11054 } |
| 11055 | 11055 |
| 11056 bool V8TestObject::stringAttributeAttributeSetterImplementedInPrivateScript(Loca
lFrame* frame, TestObject* holderImpl, String cppValue) | 11056 bool V8TestObject::PrivateScript::stringAttributeAttributeSetter(LocalFrame* fra
me, TestObject* holderImpl, String cppValue) |
| 11057 { | 11057 { |
| 11058 if (!frame) | 11058 if (!frame) |
| 11059 return false; | 11059 return false; |
| 11060 v8::HandleScope handleScope(toIsolate(frame)); | 11060 v8::HandleScope handleScope(toIsolate(frame)); |
| 11061 ScriptForbiddenScope::AllowUserAgentScript script; | 11061 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11062 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11062 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11063 if (context.IsEmpty()) | 11063 if (context.IsEmpty()) |
| 11064 return false; | 11064 return false; |
| 11065 ScriptState* scriptState = ScriptState::from(context); | 11065 ScriptState* scriptState = ScriptState::from(context); |
| 11066 if (!scriptState->executionContext()) | 11066 if (!scriptState->executionContext()) |
| 11067 return false; | 11067 return false; |
| 11068 | 11068 |
| 11069 ScriptState::Scope scope(scriptState); | 11069 ScriptState::Scope scope(scriptState); |
| 11070 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11070 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11071 | 11071 |
| 11072 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11072 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| 11073 v8::TryCatch block; | 11073 v8::TryCatch block; |
| 11074 V8RethrowTryCatchScope rethrow(block); | 11074 V8RethrowTryCatchScope rethrow(block); |
| 11075 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); | 11075 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); |
| 11076 if (block.HasCaught()) { | 11076 if (block.HasCaught()) { |
| 11077 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11077 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
| 11078 // FIXME: We should support exceptions other than DOM exceptions. | 11078 // FIXME: We should support exceptions other than DOM exceptions. |
| 11079 RELEASE_ASSERT_NOT_REACHED(); | 11079 RELEASE_ASSERT_NOT_REACHED(); |
| 11080 } | 11080 } |
| 11081 return false; | 11081 return false; |
| 11082 } | 11082 } |
| 11083 return true; | 11083 return true; |
| 11084 } | 11084 } |
| 11085 | 11085 |
| 11086 bool V8TestObject::nodeAttributeAttributeGetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) | 11086 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) |
| 11087 { | 11087 { |
| 11088 if (!frame) | 11088 if (!frame) |
| 11089 return false; | 11089 return false; |
| 11090 v8::HandleScope handleScope(toIsolate(frame)); | 11090 v8::HandleScope handleScope(toIsolate(frame)); |
| 11091 ScriptForbiddenScope::AllowUserAgentScript script; | 11091 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11092 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11092 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11093 if (context.IsEmpty()) | 11093 if (context.IsEmpty()) |
| 11094 return false; | 11094 return false; |
| 11095 ScriptState* scriptState = ScriptState::from(context); | 11095 ScriptState* scriptState = ScriptState::from(context); |
| 11096 if (!scriptState->executionContext()) | 11096 if (!scriptState->executionContext()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 11109 RELEASE_ASSERT_NOT_REACHED(); | 11109 RELEASE_ASSERT_NOT_REACHED(); |
| 11110 } | 11110 } |
| 11111 return false; | 11111 return false; |
| 11112 } | 11112 } |
| 11113 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11113 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); |
| 11114 RELEASE_ASSERT(!exceptionState.hadException()); | 11114 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11115 *result = cppValue; | 11115 *result = cppValue; |
| 11116 return true; | 11116 return true; |
| 11117 } | 11117 } |
| 11118 | 11118 |
| 11119 bool V8TestObject::nodeAttributeAttributeSetterImplementedInPrivateScript(LocalF
rame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) | 11119 bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame
, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) |
| 11120 { | 11120 { |
| 11121 if (!frame) | 11121 if (!frame) |
| 11122 return false; | 11122 return false; |
| 11123 v8::HandleScope handleScope(toIsolate(frame)); | 11123 v8::HandleScope handleScope(toIsolate(frame)); |
| 11124 ScriptForbiddenScope::AllowUserAgentScript script; | 11124 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11125 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11125 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11126 if (context.IsEmpty()) | 11126 if (context.IsEmpty()) |
| 11127 return false; | 11127 return false; |
| 11128 ScriptState* scriptState = ScriptState::from(context); | 11128 ScriptState* scriptState = ScriptState::from(context); |
| 11129 if (!scriptState->executionContext()) | 11129 if (!scriptState->executionContext()) |
| 11130 return false; | 11130 return false; |
| 11131 | 11131 |
| 11132 ScriptState::Scope scope(scriptState); | 11132 ScriptState::Scope scope(scriptState); |
| 11133 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11133 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11134 | 11134 |
| 11135 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11135 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| 11136 v8::TryCatch block; | 11136 v8::TryCatch block; |
| 11137 V8RethrowTryCatchScope rethrow(block); | 11137 V8RethrowTryCatchScope rethrow(block); |
| 11138 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); | 11138 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); |
| 11139 if (block.HasCaught()) { | 11139 if (block.HasCaught()) { |
| 11140 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11140 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
| 11141 // FIXME: We should support exceptions other than DOM exceptions. | 11141 // FIXME: We should support exceptions other than DOM exceptions. |
| 11142 RELEASE_ASSERT_NOT_REACHED(); | 11142 RELEASE_ASSERT_NOT_REACHED(); |
| 11143 } | 11143 } |
| 11144 return false; | 11144 return false; |
| 11145 } | 11145 } |
| 11146 return true; | 11146 return true; |
| 11147 } | 11147 } |
| 11148 | 11148 |
| 11149 bool V8TestObject::attributeForPrivateScriptOnlyAttributeGetterImplementedInPriv
ateScript(LocalFrame* frame, TestObject* holderImpl, String* result) | 11149 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(L
ocalFrame* frame, TestObject* holderImpl, String* result) |
| 11150 { | 11150 { |
| 11151 if (!frame) | 11151 if (!frame) |
| 11152 return false; | 11152 return false; |
| 11153 v8::HandleScope handleScope(toIsolate(frame)); | 11153 v8::HandleScope handleScope(toIsolate(frame)); |
| 11154 ScriptForbiddenScope::AllowUserAgentScript script; | 11154 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11155 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11155 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11156 if (context.IsEmpty()) | 11156 if (context.IsEmpty()) |
| 11157 return false; | 11157 return false; |
| 11158 ScriptState* scriptState = ScriptState::from(context); | 11158 ScriptState* scriptState = ScriptState::from(context); |
| 11159 if (!scriptState->executionContext()) | 11159 if (!scriptState->executionContext()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 11172 RELEASE_ASSERT_NOT_REACHED(); | 11172 RELEASE_ASSERT_NOT_REACHED(); |
| 11173 } | 11173 } |
| 11174 return false; | 11174 return false; |
| 11175 } | 11175 } |
| 11176 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 11176 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); |
| 11177 RELEASE_ASSERT(!exceptionState.hadException()); | 11177 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11178 *result = cppValue; | 11178 *result = cppValue; |
| 11179 return true; | 11179 return true; |
| 11180 } | 11180 } |
| 11181 | 11181 |
| 11182 bool V8TestObject::attributeForPrivateScriptOnlyAttributeSetterImplementedInPriv
ateScript(LocalFrame* frame, TestObject* holderImpl, String cppValue) | 11182 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeSetter(L
ocalFrame* frame, TestObject* holderImpl, String cppValue) |
| 11183 { | 11183 { |
| 11184 if (!frame) | 11184 if (!frame) |
| 11185 return false; | 11185 return false; |
| 11186 v8::HandleScope handleScope(toIsolate(frame)); | 11186 v8::HandleScope handleScope(toIsolate(frame)); |
| 11187 ScriptForbiddenScope::AllowUserAgentScript script; | 11187 ScriptForbiddenScope::AllowUserAgentScript script; |
| 11188 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 11188 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
| 11189 if (context.IsEmpty()) | 11189 if (context.IsEmpty()) |
| 11190 return false; | 11190 return false; |
| 11191 ScriptState* scriptState = ScriptState::from(context); | 11191 ScriptState* scriptState = ScriptState::from(context); |
| 11192 if (!scriptState->executionContext()) | 11192 if (!scriptState->executionContext()) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 11203 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 11203 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { |
| 11204 // FIXME: We should support exceptions other than DOM exceptions. | 11204 // FIXME: We should support exceptions other than DOM exceptions. |
| 11205 RELEASE_ASSERT_NOT_REACHED(); | 11205 RELEASE_ASSERT_NOT_REACHED(); |
| 11206 } | 11206 } |
| 11207 return false; | 11207 return false; |
| 11208 } | 11208 } |
| 11209 return true; | 11209 return true; |
| 11210 } | 11210 } |
| 11211 | 11211 |
| 11212 } // namespace blink | 11212 } // namespace blink |
| OLD | NEW |