Index: Source/bindings/tests/results/core/V8TestInterface2.cpp |
diff --git a/Source/bindings/tests/results/core/V8TestInterface2.cpp b/Source/bindings/tests/results/core/V8TestInterface2.cpp |
index 172fd3447f397ce773ac0e663be17505f6f1b46d..14b1bd16ba3eade58cced755c528d55f8c58f87a 100644 |
--- a/Source/bindings/tests/results/core/V8TestInterface2.cpp |
+++ b/Source/bindings/tests/results/core/V8TestInterface2.cpp |
@@ -236,7 +236,7 @@ static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "TestInterface2", info.Holder(), info.GetIsolate()); |
TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
- RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); |
+ RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
exceptionState.throwIfNeeded(); |
return; |
@@ -256,7 +256,7 @@ static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "TestInterface2", info.Holder(), info.GetIsolate()); |
TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
- RawPtr<Iterator> result = impl->values(scriptState, exceptionState); |
+ RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
exceptionState.throwIfNeeded(); |
return; |
@@ -276,7 +276,7 @@ static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "TestInterface2", info.Holder(), info.GetIsolate()); |
TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
- RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); |
+ RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
exceptionState.throwIfNeeded(); |
return; |
@@ -312,7 +312,7 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
} |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
- impl->forEach(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState); |
+ impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState); |
if (exceptionState.hadException()) { |
exceptionState.throwIfNeeded(); |
return; |
@@ -326,10 +326,39 @@ static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf |
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
} |
+static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "TestInterface2", info.Holder(), info.GetIsolate()); |
+ if (UNLIKELY(info.Length() < 1)) { |
+ setMinimumArityTypeError(exceptionState, 1, info.Length()); |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
+ TestInterfaceEmpty* value; |
+ { |
+ value = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
+ } |
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
+ bool result = impl->hasForBinding(scriptState, value, exceptionState); |
+ if (exceptionState.hadException()) { |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ v8SetReturnValueBool(info, result); |
+} |
+ |
+static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface2V8Internal::hasMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
- v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); |
+ v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
} |
static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -585,6 +614,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = |
{"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
{"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
{"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
+ {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
{"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
}; |