Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 362993004: Implement Blink-in-JS for DOM attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedArrayAttribute"); 1874 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedArrayAttribute");
1875 TestObject* impl = V8TestObject::toNative(holder); 1875 TestObject* impl = V8TestObject::toNative(holder);
1876 if (!impl->isArrayDirty()) { 1876 if (!impl->isArrayDirty()) {
1877 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName); 1877 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName);
1878 if (!v8Value.IsEmpty()) { 1878 if (!v8Value.IsEmpty()) {
1879 v8SetReturnValue(info, v8Value); 1879 v8SetReturnValue(info, v8Value);
1880 return; 1880 return;
1881 } 1881 }
1882 } 1882 }
1883 Vector<String> cppValue(impl->cachedArrayAttribute()); 1883 Vector<String> cppValue(impl->cachedArrayAttribute());
1884 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Arr ay(cppValue, info.Holder(), info.GetIsolate())); 1884 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Arr ay(cppValue, scriptState->context()->Global(), scriptState->isolate()));
1885 v8SetReturnValue(info, v8Array(cppValue, info.Holder(), info.GetIsolate())); 1885 v8SetReturnValue(info, v8Array(cppValue, info.Holder(), info.GetIsolate()));
1886 } 1886 }
1887 1887
1888 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 1888 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1889 { 1889 {
1890 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1890 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1891 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); 1891 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info);
1892 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1892 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1893 } 1893 }
1894 1894
(...skipping 19 matching lines...) Expand all
1914 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedStringOrNoneAttribute"); 1914 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedStringOrNoneAttribute");
1915 TestObject* impl = V8TestObject::toNative(holder); 1915 TestObject* impl = V8TestObject::toNative(holder);
1916 if (!impl->isStringDirty()) { 1916 if (!impl->isStringDirty()) {
1917 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName); 1917 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName);
1918 if (!v8Value.IsEmpty()) { 1918 if (!v8Value.IsEmpty()) {
1919 v8SetReturnValue(info, v8Value); 1919 v8SetReturnValue(info, v8Value);
1920 return; 1920 return;
1921 } 1921 }
1922 } 1922 }
1923 String cppValue(impl->cachedStringOrNoneAttribute()); 1923 String cppValue(impl->cachedStringOrNoneAttribute());
1924 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa lue.isNull() ? v8::Handle<v8::Value>(v8::Null(info.GetIsolate())) : v8String(inf o.GetIsolate(), cppValue)); 1924 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa lue.isNull() ? v8::Handle<v8::Value>(v8::Null(scriptState->isolate())) : v8Strin g(scriptState->isolate(), cppValue));
1925 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); 1925 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate());
1926 } 1926 }
1927 1927
1928 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 1928 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
1929 { 1929 {
1930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1931 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); 1931 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info);
1932 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1932 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1933 } 1933 }
1934 1934
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4286 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedTreatReturnedNullStringAsUndefinedStringAttribute"); 4286 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedTreatReturnedNullStringAsUndefinedStringAttribute");
4287 TestObject* impl = V8TestObject::toNative(holder); 4287 TestObject* impl = V8TestObject::toNative(holder);
4288 if (!impl->isStringDirty()) { 4288 if (!impl->isStringDirty()) {
4289 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName); 4289 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName);
4290 if (!v8Value.IsEmpty()) { 4290 if (!v8Value.IsEmpty()) {
4291 v8SetReturnValue(info, v8Value); 4291 v8SetReturnValue(info, v8Value);
4292 return; 4292 return;
4293 } 4293 }
4294 } 4294 }
4295 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut e()); 4295 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut e());
4296 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); 4296 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Str ing(scriptState->isolate(), cppValue));
4297 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); 4297 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate());
4298 } 4298 }
4299 4299
4300 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf o) 4300 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf o)
4301 { 4301 {
4302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 4302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
4303 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut eAttributeGetter(info); 4303 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut eAttributeGetter(info);
4304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 4304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
4305 } 4305 }
4306 4306
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 } 4655 }
4656 4656
4657 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCal lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal lbackInfo<void>& info) 4657 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCal lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal lbackInfo<void>& info)
4658 { 4658 {
4659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 4659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
4660 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext()); 4660 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext());
4661 V8PerContextData* contextData = scriptState->perContextData(); 4661 V8PerContextData* contextData = scriptState->perContextData();
4662 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger()) { 4662 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger()) {
4663 TestObject* impl = V8TestObject::toNative(info.Holder()); 4663 TestObject* impl = V8TestObject::toNative(info.Holder());
4664 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute ()); 4664 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute ());
4665 v8::Handle<v8::Value> originalValue = cppValue.isNull() ? v8::Handle<v8: :Value>(v8::Null(info.GetIsolate())) : v8String(info.GetIsolate(), cppValue); 4665 v8::Handle<v8::Value> originalValue = cppValue.isNull() ? v8::Handle<v8: :Value>(v8::Null(scriptState->isolate())) : v8String(scriptState->isolate(), cpp Value);
4666 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett erOnlyLogPreviousValueAttribute", v8Value, originalValue); 4666 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett erOnlyLogPreviousValueAttribute", v8Value, originalValue);
4667 } 4667 }
4668 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr ibuteSetter(v8Value, info); 4668 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr ibuteSetter(v8Value, info);
4669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 4669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
4670 } 4670 }
4671 4671
4672 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info) 4672 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info)
4673 { 4673 {
4674 v8::Handle<v8::Object> holder = info.Holder(); 4674 v8::Handle<v8::Object> holder = info.Holder();
4675 TestObject* impl = V8TestObject::toNative(holder); 4675 TestObject* impl = V8TestObject::toNative(holder);
(...skipping 21 matching lines...) Expand all
4697 } 4697 }
4698 4698
4699 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCall back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall backInfo<void>& info) 4699 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCall back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall backInfo<void>& info)
4700 { 4700 {
4701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 4701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
4702 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext()); 4702 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext());
4703 V8PerContextData* contextData = scriptState->perContextData(); 4703 V8PerContextData* contextData = scriptState->perContextData();
4704 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger()) { 4704 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger()) {
4705 TestObject* impl = V8TestObject::toNative(info.Holder()); 4705 TestObject* impl = V8TestObject::toNative(info.Holder());
4706 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValu eInterfaceAttribute()); 4706 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValu eInterfaceAttribute());
4707 v8::Handle<v8::Value> originalValue = toV8(cppValue, info.Holder(), info .GetIsolate()); 4707 v8::Handle<v8::Value> originalValue = toV8(cppValue, scriptState->contex t()->Global(), scriptState->isolate());
4708 contextData->activityLogger()->logSetter("TestObject.activityLoggingLogP reviousValueInterfaceAttribute", v8Value, originalValue); 4708 contextData->activityLogger()->logSetter("TestObject.activityLoggingLogP reviousValueInterfaceAttribute", v8Value, originalValue);
4709 } 4709 }
4710 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri buteSetter(v8Value, info); 4710 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri buteSetter(v8Value, info);
4711 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 4711 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
4712 } 4712 }
4713 4713
4714 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 4714 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
4715 { 4715 {
4716 v8::Handle<v8::Object> holder = info.Holder(); 4716 v8::Handle<v8::Object> holder = info.Holder();
4717 TestObject* impl = V8TestObject::toNative(holder); 4717 TestObject* impl = V8TestObject::toNative(holder);
(...skipping 4971 matching lines...) Expand 10 before | Expand all | Expand 10 after
9689 ScriptState* scriptState = ScriptState::from(context); 9689 ScriptState* scriptState = ScriptState::from(context);
9690 if (!scriptState->executionContext()) 9690 if (!scriptState->executionContext())
9691 return false; 9691 return false;
9692 9692
9693 ScriptState::Scope scope(scriptState); 9693 ScriptState::Scope scope(scriptState);
9694 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9694 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9695 9695
9696 v8::Handle<v8::Value> *argv = 0; 9696 v8::Handle<v8::Value> *argv = 0;
9697 // FIXME: Support exceptions thrown from Blink-in-JS. 9697 // FIXME: Support exceptions thrown from Blink-in-JS.
9698 v8::TryCatch block; 9698 v8::TryCatch block;
9699 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl ementedInPrivateScript", holder, 0, argv); 9699 PrivateScriptRunner::run(scriptState, "TestObject", "voidMethodImplementedIn PrivateScript", holder, 0, argv);
9700 if (block.HasCaught()) 9700 if (block.HasCaught())
9701 return false; 9701 return false;
9702 return true; 9702 return true;
9703 } 9703 }
9704 9704
9705 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 9705 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
9706 { 9706 {
9707 TestObject* impl = V8TestObject::toNative(info.Holder()); 9707 TestObject* impl = V8TestObject::toNative(info.Holder());
9708 voidMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(toFrame IfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); 9708 voidMethodImplementedInPrivateScriptMethodImplementedInPrivateScript(toFrame IfNotDetached(info.GetIsolate()->GetCurrentContext()), impl);
9709 } 9709 }
(...skipping 15 matching lines...) Expand all
9725 ScriptState* scriptState = ScriptState::from(context); 9725 ScriptState* scriptState = ScriptState::from(context);
9726 if (!scriptState->executionContext()) 9726 if (!scriptState->executionContext())
9727 return false; 9727 return false;
9728 9728
9729 ScriptState::Scope scope(scriptState); 9729 ScriptState::Scope scope(scriptState);
9730 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9730 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9731 9731
9732 v8::Handle<v8::Value> *argv = 0; 9732 v8::Handle<v8::Value> *argv = 0;
9733 // FIXME: Support exceptions thrown from Blink-in-JS. 9733 // FIXME: Support exceptions thrown from Blink-in-JS.
9734 v8::TryCatch block; 9734 v8::TryCatch block;
9735 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); 9735 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::run(scriptState, "TestO bject", "shortMethodImplementedInPrivateScript", holder, 0, argv);
9736 if (block.HasCaught()) 9736 if (block.HasCaught())
9737 return false; 9737 return false;
9738 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr iptState->isolate()); 9738 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr iptState->isolate());
9739 int cppValue = toInt16(v8Value, exceptionState); 9739 int cppValue = toInt16(v8Value, exceptionState);
9740 if (block.HasCaught()) 9740 if (block.HasCaught())
9741 return false; 9741 return false;
9742 *result = cppValue; 9742 *result = cppValue;
9743 return true; 9743 return true;
9744 } 9744 }
9745 9745
(...skipping 24 matching lines...) Expand all
9770 if (!scriptState->executionContext()) 9770 if (!scriptState->executionContext())
9771 return false; 9771 return false;
9772 9772
9773 ScriptState::Scope scope(scriptState); 9773 ScriptState::Scope scope(scriptState);
9774 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9774 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9775 9775
9776 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); 9776 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
9777 v8::Handle<v8::Value> argv[] = { valueHandle }; 9777 v8::Handle<v8::Value> argv[] = { valueHandle };
9778 // FIXME: Support exceptions thrown from Blink-in-JS. 9778 // FIXME: Support exceptions thrown from Blink-in-JS.
9779 v8::TryCatch block; 9779 v8::TryCatch block;
9780 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde r, 1, argv); 9780 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::run(scriptState, "TestO bject", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, arg v);
9781 if (block.HasCaught()) 9781 if (block.HasCaught())
9782 return false; 9782 return false;
9783 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context ()->Global(), scriptState->isolate()); 9783 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context ()->Global(), scriptState->isolate());
9784 int cppValue = toInt16(v8Value, exceptionState); 9784 int cppValue = toInt16(v8Value, exceptionState);
9785 if (block.HasCaught()) 9785 if (block.HasCaught())
9786 return false; 9786 return false;
9787 *result = cppValue; 9787 *result = cppValue;
9788 return true; 9788 return true;
9789 } 9789 }
9790 9790
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
9826 if (!scriptState->executionContext()) 9826 if (!scriptState->executionContext())
9827 return false; 9827 return false;
9828 9828
9829 ScriptState::Scope scope(scriptState); 9829 ScriptState::Scope scope(scriptState);
9830 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9830 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9831 9831
9832 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); 9832 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value);
9833 v8::Handle<v8::Value> argv[] = { valueHandle }; 9833 v8::Handle<v8::Value> argv[] = { valueHandle };
9834 // FIXME: Support exceptions thrown from Blink-in-JS. 9834 // FIXME: Support exceptions thrown from Blink-in-JS.
9835 v8::TryCatch block; 9835 v8::TryCatch block;
9836 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol der, 1, argv); 9836 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::run(scriptState, "TestO bject", "stringMethodWithStringArgumentImplementedInPrivateScript", holder, 1, a rgv);
9837 if (block.HasCaught()) 9837 if (block.HasCaught())
9838 return false; 9838 return false;
9839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate()); 9839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate());
9840 V8StringResource<> cppValue = v8Value; 9840 V8StringResource<> cppValue = v8Value;
9841 if (block.HasCaught()) 9841 if (block.HasCaught())
9842 return false; 9842 return false;
9843 *result = cppValue; 9843 *result = cppValue;
9844 return true; 9844 return true;
9845 } 9845 }
9846 9846
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
9879 if (!scriptState->executionContext()) 9879 if (!scriptState->executionContext())
9880 return false; 9880 return false;
9881 9881
9882 ScriptState::Scope scope(scriptState); 9882 ScriptState::Scope scope(scriptState);
9883 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9883 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9884 9884
9885 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob al(), scriptState->isolate()); 9885 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob al(), scriptState->isolate());
9886 v8::Handle<v8::Value> argv[] = { valueHandle }; 9886 v8::Handle<v8::Value> argv[] = { valueHandle };
9887 // FIXME: Support exceptions thrown from Blink-in-JS. 9887 // FIXME: Support exceptions thrown from Blink-in-JS.
9888 v8::TryCatch block; 9888 v8::TryCatch block;
9889 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder, 1, argv); 9889 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::run(scriptState, "TestO bject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder, 1, argv) ;
9890 if (block.HasCaught()) 9890 if (block.HasCaught())
9891 return false; 9891 return false;
9892 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context() ->Global(), scriptState->isolate()); 9892 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context() ->Global(), scriptState->isolate());
9893 Node* cppValue = V8Node::toNativeWithTypeCheck(scriptState->isolate(), v8Val ue); 9893 Node* cppValue = V8Node::toNativeWithTypeCheck(scriptState->isolate(), v8Val ue);
9894 if (block.HasCaught()) 9894 if (block.HasCaught())
9895 return false; 9895 return false;
9896 *result = cppValue; 9896 *result = cppValue;
9897 return true; 9897 return true;
9898 } 9898 }
9899 9899
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
9938 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 9938 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
9939 9939
9940 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context() ->Global(), scriptState->isolate()); 9940 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context() ->Global(), scriptState->isolate());
9941 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global (), scriptState->isolate()); 9941 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global (), scriptState->isolate());
9942 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate() , value1); 9942 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate() , value1);
9943 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2); 9943 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2);
9944 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string ); 9944 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string );
9945 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v alue2Handle, stringHandle }; 9945 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v alue2Handle, stringHandle };
9946 // FIXME: Support exceptions thrown from Blink-in-JS. 9946 // FIXME: Support exceptions thrown from Blink-in-JS.
9947 v8::TryCatch block; 9947 v8::TryCatch block;
9948 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol der, 5, argv); 9948 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::run(scriptState, "TestO bject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", holder, 5, a rgv);
9949 if (block.HasCaught()) 9949 if (block.HasCaught())
9950 return false; 9950 return false;
9951 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate()); 9951 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate());
9952 Node* cppValue = V8Node::toNativeWithTypeCheck(scriptState->isolate(), v8Val ue); 9952 Node* cppValue = V8Node::toNativeWithTypeCheck(scriptState->isolate(), v8Val ue);
9953 if (block.HasCaught()) 9953 if (block.HasCaught())
9954 return false; 9954 return false;
9955 *result = cppValue; 9955 *result = cppValue;
9956 return true; 9956 return true;
9957 } 9957 }
9958 9958
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
10566 fromInternalPointer(object)->deref(); 10566 fromInternalPointer(object)->deref();
10567 } 10567 }
10568 10568
10569 template<> 10569 template<>
10570 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 10570 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
10571 { 10571 {
10572 return toV8(impl, creationContext, isolate); 10572 return toV8(impl, creationContext, isolate);
10573 } 10573 }
10574 10574
10575 } // namespace WebCore 10575 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698