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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 656073002: IDL: Use ALLOW_ONLY_INLINE_ALLOCATION() in dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionary.cpp ('k') | Source/core/css/FontFaceDescriptors.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index 3f2f405e0c0f8dff34d1632c950217578c9887ab..63c2251db4516aaba7a6d7d255dc6fdcc0977ca7 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -6359,14 +6359,14 @@ static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
{
TestObject* impl = V8TestObject::toImpl(info.Holder());
RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr;
- TestDictionary* result1 = nullptr;
+ Nullable<TestDictionary> result1;
impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, result1);
if (result0) {
v8SetReturnValue(info, result0.release());
return;
}
if (result1) {
- v8SetReturnValue(info, result1);
+ v8SetReturnValue(info, result);
return;
}
v8SetReturnValueNull(info);
@@ -6556,6 +6556,21 @@ static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
+static void testDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestObject* impl = V8TestObject::toImpl(info.Holder());
+ TestDictionary result;
+ impl->testDictionaryMethod(result);
+ v8SetReturnValue(info, result);
+}
+
+static void testDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
+ TestObjectV8Internal::testDictionaryMethodMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
+}
+
static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObject* impl = V8TestObject::toImpl(info.Holder());
@@ -8040,20 +8055,16 @@ static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(info.Holder());
- TestDictionary* testDictionaryArg;
+ TestDictionary testDictionaryArg;
{
- if (!info[0]->IsUndefined()) {
- if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
- exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object.");
- exceptionState.throwIfNeeded();
- return;
- }
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testDictionaryArg, V8TestDictionary::toImpl(info.GetIsolate(), info[0], exceptionState), exceptionState);
- } else {
- testDictionaryArg = TestDictionary::create();
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
+ exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object.");
+ exceptionState.throwIfNeeded();
+ return;
}
+ TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg, exceptionState), exceptionState);
}
- impl->overloadedMethodJ(*testDictionaryArg);
+ impl->overloadedMethodJ(testDictionaryArg);
}
static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -10362,6 +10373,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
{"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
+ {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, V8DOMConfiguration::ExposedToAllScripts},
{"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWithoutExceptionStateMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionary.cpp ('k') | Source/core/css/FontFaceDescriptors.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698