| 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 "V8TestInterface3.h" | 7 #include "V8TestInterface3.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 72 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 73 { | 73 { |
| 74 TestInterface3V8Internal::voidMethodDocumentMethod(info); | 74 TestInterface3V8Internal::voidMethodDocumentMethod(info); |
| 75 } | 75 } |
| 76 | 76 |
| 77 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 77 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 78 { | 78 { |
| 79 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface3", info.Holder(), info.GetIsolate()); | 79 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface3", info.Holder(), info.GetIsolate()); |
| 80 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 80 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 81 ScriptState* scriptState = ScriptState::forHolderObject(info); | 81 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 82 Iterator* result = impl->iterableKeys(scriptState, exceptionState); | 82 Iterator* result = impl->iterableKeys(scriptState, exceptionState); |
| 83 if (exceptionState.hadException()) { | 83 if (exceptionState.hadException()) { |
| 84 exceptionState.throwIfNeeded(); | 84 exceptionState.throwIfNeeded(); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 v8SetReturnValue(info, result); | 87 v8SetReturnValue(info, result); |
| 88 } | 88 } |
| 89 | 89 |
| 90 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 90 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 91 { | 91 { |
| 92 TestInterface3V8Internal::keysMethod(info); | 92 TestInterface3V8Internal::keysMethod(info); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 95 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 96 { | 96 { |
| 97 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface3", info.Holder(), info.GetIsolate()); | 97 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface3", info.Holder(), info.GetIsolate()); |
| 98 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 98 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 99 ScriptState* scriptState = ScriptState::forHolderObject(info); | 99 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 100 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 100 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 101 if (exceptionState.hadException()) { | 101 if (exceptionState.hadException()) { |
| 102 exceptionState.throwIfNeeded(); | 102 exceptionState.throwIfNeeded(); |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 v8SetReturnValue(info, result); | 105 v8SetReturnValue(info, result); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 108 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 109 { | 109 { |
| 110 TestInterface3V8Internal::valuesMethod(info); | 110 TestInterface3V8Internal::valuesMethod(info); |
| 111 } | 111 } |
| 112 | 112 |
| 113 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 113 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 114 { | 114 { |
| 115 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface3", info.Holder(), info.GetIsolate()); | 115 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface3", info.Holder(), info.GetIsolate()); |
| 116 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 116 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 117 ScriptState* scriptState = ScriptState::forHolderObject(info); | 117 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 118 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 118 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| 119 if (exceptionState.hadException()) { | 119 if (exceptionState.hadException()) { |
| 120 exceptionState.throwIfNeeded(); | 120 exceptionState.throwIfNeeded(); |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 v8SetReturnValue(info, result); | 123 v8SetReturnValue(info, result); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 126 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 127 { | 127 { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 141 ScriptValue thisArg; | 141 ScriptValue thisArg; |
| 142 { | 142 { |
| 143 if (!info[0]->IsFunction()) { | 143 if (!info[0]->IsFunction()) { |
| 144 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 144 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 145 exceptionState.throwIfNeeded(); | 145 exceptionState.throwIfNeeded(); |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 148 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 149 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 149 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 150 } | 150 } |
| 151 ScriptState* scriptState = ScriptState::forHolderObject(info); | 151 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 152 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); | 152 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); |
| 153 if (exceptionState.hadException()) { | 153 if (exceptionState.hadException()) { |
| 154 exceptionState.throwIfNeeded(); | 154 exceptionState.throwIfNeeded(); |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| 159 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 159 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 160 { | 160 { |
| 161 TestInterface3V8Internal::forEachMethod(info); | 161 TestInterface3V8Internal::forEachMethod(info); |
| 162 } | 162 } |
| 163 | 163 |
| 164 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 164 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 165 { | 165 { |
| 166 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 166 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 167 v8SetReturnValueString(info, impl->readonlyStringifierAttribute(), info.GetI
solate()); | 167 v8SetReturnValueString(info, impl->readonlyStringifierAttribute(), info.GetI
solate()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 170 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 171 { | 171 { |
| 172 TestInterface3V8Internal::toStringMethod(info); | 172 TestInterface3V8Internal::toStringMethod(info); |
| 173 } | 173 } |
| 174 | 174 |
| 175 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 175 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 176 { | 176 { |
| 177 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); | 177 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); |
| 178 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 178 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 179 ScriptState* scriptState = ScriptState::forHolderObject(info); | 179 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 180 Iterator* result = impl->iterator(scriptState, exceptionState); | 180 Iterator* result = impl->iterator(scriptState, exceptionState); |
| 181 if (exceptionState.hadException()) { | 181 if (exceptionState.hadException()) { |
| 182 exceptionState.throwIfNeeded(); | 182 exceptionState.throwIfNeeded(); |
| 183 return; | 183 return; |
| 184 } | 184 } |
| 185 v8SetReturnValue(info, result); | 185 v8SetReturnValue(info, result); |
| 186 } | 186 } |
| 187 | 187 |
| 188 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 188 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 189 { | 189 { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 { | 309 { |
| 310 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 310 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 311 } | 311 } |
| 312 | 312 |
| 313 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) | 313 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) |
| 314 { | 314 { |
| 315 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 315 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace blink | 318 } // namespace blink |
| OLD | NEW |