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 "V8TestObject.h" | 7 #include "V8TestObject.h" |
8 | 8 |
9 #include "bindings/core/v8/BindingSecurity.h" | 9 #include "bindings/core/v8/BindingSecurity.h" |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 10133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10144 } | 10144 } |
10145 | 10145 |
10146 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) | 10146 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) |
10147 { | 10147 { |
10148 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); | 10148 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); |
10149 if (UNLIKELY(info.Length() < 1)) { | 10149 if (UNLIKELY(info.Length() < 1)) { |
10150 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10150 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10151 exceptionState.throwIfNeeded(); | 10151 exceptionState.throwIfNeeded(); |
10152 return; | 10152 return; |
10153 } | 10153 } |
10154 Transferables transferables; | 10154 Transferables* transferables = Transferables::create(); |
10155 if (info.Length() > 1) { | 10155 if (info.Length() > 1) { |
10156 const int transferablesArgIndex = 1; | 10156 const int transferablesArgIndex = 1; |
10157 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState))
{ | 10157 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, *transferables, exceptionState))
{ |
10158 exceptionState.throwIfNeeded(); | 10158 exceptionState.throwIfNeeded(); |
10159 return; | 10159 return; |
10160 } | 10160 } |
10161 } | 10161 } |
10162 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan
ce().create(info.GetIsolate(), info[0], &transferables, exceptionState); | 10162 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan
ce().create(info.GetIsolate(), info[0], transferables, exceptionState); |
10163 if (exceptionState.throwIfNeeded()) | 10163 if (exceptionState.throwIfNeeded()) |
10164 return; | 10164 return; |
10165 // FIXME: Only pass context/exceptionState if instance really requires it. | 10165 // FIXME: Only pass context/exceptionState if instance really requires it. |
10166 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); | 10166 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
10167 instance->postMessage(context, message.release(), transferables.messagePorts
, exceptionState); | 10167 instance->postMessage(context, message.release(), transferables->messagePort
s, exceptionState); |
10168 exceptionState.throwIfNeeded(); | 10168 exceptionState.throwIfNeeded(); |
10169 } | 10169 } |
10170 | 10170 |
10171 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 10171 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
10172 { | 10172 { |
10173 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); | 10173 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); |
10174 } | 10174 } |
10175 | 10175 |
10176 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 10176 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
10177 { | 10177 { |
(...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12561 ScriptState::Scope scope(scriptState); | 12561 ScriptState::Scope scope(scriptState); |
12562 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12562 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12563 if (holder.IsEmpty()) | 12563 if (holder.IsEmpty()) |
12564 return false; | 12564 return false; |
12565 | 12565 |
12566 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 12566 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
12567 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 12567 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
12568 } | 12568 } |
12569 | 12569 |
12570 } // namespace blink | 12570 } // namespace blink |
OLD | NEW |