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

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

Issue 1097773004: Sharing of SharedArrayBuffer via PostMessage transfer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update for non-split typedarray hierarchy Created 5 years, 6 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" 49 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h"
50 #include "bindings/core/v8/V8TestNode.h" 50 #include "bindings/core/v8/V8TestNode.h"
51 #include "bindings/core/v8/V8TestObject.h" 51 #include "bindings/core/v8/V8TestObject.h"
52 #include "bindings/core/v8/V8Uint8Array.h" 52 #include "bindings/core/v8/V8Uint8Array.h"
53 #include "bindings/core/v8/V8Window.h" 53 #include "bindings/core/v8/V8Window.h"
54 #include "bindings/core/v8/V8XPathNSResolver.h" 54 #include "bindings/core/v8/V8XPathNSResolver.h"
55 #include "core/HTMLNames.h" 55 #include "core/HTMLNames.h"
56 #include "core/dom/ClassCollection.h" 56 #include "core/dom/ClassCollection.h"
57 #include "core/dom/ContextFeatures.h" 57 #include "core/dom/ContextFeatures.h"
58 #include "core/dom/DOMArrayBuffer.h" 58 #include "core/dom/DOMArrayBuffer.h"
59 #include "core/dom/DOMSharedArrayBuffer.h"
59 #include "core/dom/Document.h" 60 #include "core/dom/Document.h"
60 #include "core/dom/MessagePort.h" 61 #include "core/dom/MessagePort.h"
61 #include "core/dom/TagCollection.h" 62 #include "core/dom/TagCollection.h"
62 #include "core/dom/custom/CustomElementProcessingStack.h" 63 #include "core/dom/custom/CustomElementProcessingStack.h"
63 #include "core/frame/LocalFrame.h" 64 #include "core/frame/LocalFrame.h"
64 #include "core/frame/UseCounter.h" 65 #include "core/frame/UseCounter.h"
65 #include "core/html/HTMLCollection.h" 66 #include "core/html/HTMLCollection.h"
66 #include "core/html/HTMLDataListOptionsCollection.h" 67 #include "core/html/HTMLDataListOptionsCollection.h"
67 #include "core/html/HTMLFormControlsCollection.h" 68 #include "core/html/HTMLFormControlsCollection.h"
68 #include "core/html/HTMLTableRowsCollection.h" 69 #include "core/html/HTMLTableRowsCollection.h"
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1091 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1091 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); 1092 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info);
1092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1093 } 1094 }
1094 1095
1095 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1096 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1096 { 1097 {
1097 v8::Local<v8::Object> holder = info.Holder(); 1098 v8::Local<v8::Object> holder = info.Holder();
1098 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri ptValueAttribute", "TestObject", holder, info.GetIsolate()); 1099 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri ptValueAttribute", "TestObject", holder, info.GetIsolate());
1099 TestObject* impl = V8TestObject::toImpl(holder); 1100 TestObject* impl = V8TestObject::toImpl(holder);
1100 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta nce().create(info.GetIsolate(), v8Value, 0, 0, exceptionState); 1101 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta nce().create(info.GetIsolate(), v8Value, 0, 0, 0, exceptionState);
1101 if (exceptionState.throwIfNeeded()) 1102 if (exceptionState.throwIfNeeded())
1102 return; 1103 return;
1103 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); 1104 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue));
1104 } 1105 }
1105 1106
1106 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 1107 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
1107 { 1108 {
1108 v8::Local<v8::Value> v8Value = info[0]; 1109 v8::Local<v8::Value> v8Value = info[0];
1109 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1110 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value, info); 1111 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value, info);
(...skipping 6803 matching lines...) Expand 10 before | Expand all | Expand 10 after
7914 { 7915 {
7915 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); 7916 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate());
7916 if (UNLIKELY(info.Length() < 1)) { 7917 if (UNLIKELY(info.Length() < 1)) {
7917 setMinimumArityTypeError(exceptionState, 1, info.Length()); 7918 setMinimumArityTypeError(exceptionState, 1, info.Length());
7918 exceptionState.throwIfNeeded(); 7919 exceptionState.throwIfNeeded();
7919 return; 7920 return;
7920 } 7921 }
7921 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7922 TestObject* impl = V8TestObject::toImpl(info.Holder());
7922 RefPtr<SerializedScriptValue> serializedScriptValueArg; 7923 RefPtr<SerializedScriptValue> serializedScriptValueArg;
7923 { 7924 {
7924 serializedScriptValueArg = SerializedScriptValueFactory::instance().crea te(info.GetIsolate(), info[0], 0, 0, exceptionState); 7925 serializedScriptValueArg = SerializedScriptValueFactory::instance().crea te(info.GetIsolate(), info[0], 0, 0, 0, exceptionState);
7925 if (exceptionState.throwIfNeeded()) 7926 if (exceptionState.throwIfNeeded())
7926 return; 7927 return;
7927 } 7928 }
7928 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); 7929 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
7929 } 7930 }
7930 7931
7931 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 7932 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
7932 { 7933 {
7933 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7934 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7934 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); 7935 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info);
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
10888 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8:: FunctionCallbackInfo<v8::Value>& info) 10889 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8:: FunctionCallbackInfo<v8::Value>& info)
10889 { 10890 {
10890 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage ", interfaceName, info.Holder(), info.GetIsolate()); 10891 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage ", interfaceName, info.Holder(), info.GetIsolate());
10891 if (UNLIKELY(info.Length() < 1)) { 10892 if (UNLIKELY(info.Length() < 1)) {
10892 setMinimumArityTypeError(exceptionState, 1, info.Length()); 10893 setMinimumArityTypeError(exceptionState, 1, info.Length());
10893 exceptionState.throwIfNeeded(); 10894 exceptionState.throwIfNeeded();
10894 return; 10895 return;
10895 } 10896 }
10896 OwnPtrWillBeRawPtr<MessagePortArray> ports = adoptPtrWillBeNoop(new MessageP ortArray); 10897 OwnPtrWillBeRawPtr<MessagePortArray> ports = adoptPtrWillBeNoop(new MessageP ortArray);
10897 ArrayBufferArray arrayBuffers; 10898 ArrayBufferArray arrayBuffers;
10899 SharedArrayBufferArray sharedArrayBuffers;
10898 if (info.Length() > 1) { 10900 if (info.Length() > 1) {
10899 const int transferablesArgIndex = 1; 10901 const int transferablesArgIndex = 1;
10900 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, exceptionS tate)) { 10902 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, sharedArra yBuffers, exceptionState)) {
10901 exceptionState.throwIfNeeded(); 10903 exceptionState.throwIfNeeded();
10902 return; 10904 return;
10903 } 10905 }
10904 } 10906 }
10905 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, exceptionSta te); 10907 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, &sharedArray Buffers, exceptionState);
10906 if (exceptionState.throwIfNeeded()) 10908 if (exceptionState.throwIfNeeded())
10907 return; 10909 return;
10908 // FIXME: Only pass context/exceptionState if instance really requires it. 10910 // FIXME: Only pass context/exceptionState if instance really requires it.
10909 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); 10911 ExecutionContext* context = currentExecutionContext(info.GetIsolate());
10910 instance->postMessage(context, message.release(), ports.get(), exceptionStat e); 10912 instance->postMessage(context, message.release(), ports.get(), exceptionStat e);
10911 exceptionState.throwIfNeeded(); 10913 exceptionState.throwIfNeeded();
10912 } 10914 }
10913 10915
10914 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 10916 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10915 { 10917 {
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
13590 ScriptState::Scope scope(scriptState); 13592 ScriptState::Scope scope(scriptState);
13591 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 13593 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
13592 if (holder.IsEmpty()) 13594 if (holder.IsEmpty())
13593 return false; 13595 return false;
13594 13596
13595 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 13597 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
13596 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 13598 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
13597 } 13599 }
13598 13600
13599 } // namespace blink 13601 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698