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

Unified Diff: Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp

Issue 140693016: IDL compiler: interface and integer types for special operations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Typo Created 6 years, 11 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
Index: Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp
diff --git a/Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp b/Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp
index 252068e2891109d37bbaf3343b6326dcdd4b5a8e..598374fde94e1c0a92130d7dc40e4d5c447ee3cf 100644
--- a/Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp
+++ b/Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.cpp
@@ -34,12 +34,15 @@
#include "V8TestSpecialOperationsIdentifierRaisesException.h"
#include "RuntimeEnabledFeatures.h"
+#include "V8TestInterfaceEmpty.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "platform/TraceEvent.h"
+#include "wtf/GetPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -79,10 +82,10 @@ static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
}
TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState), exceptionState);
- String result = imp->item(index, exceptionState);
+ RefPtr<TestInterfaceEmpty> result = imp->item(index, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- v8SetReturnValueString(info, result, info.GetIsolate());
+ v8SetReturnValue(info, result.release());
}
static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -149,10 +152,10 @@ static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
}
TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
- String result = imp->namedItem(name, exceptionState);
+ RefPtr<TestInterfaceEmpty> result = imp->namedItem(name, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- v8SetReturnValueString(info, result, info.GetIsolate());
+ v8SetReturnValue(info, result.release());
}
static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -213,12 +216,12 @@ static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
{
TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
- String element = collection->item(index, exceptionState);
+ RefPtr<TestInterfaceEmpty> element = collection->item(index, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- if (element.isNull())
+ if (!element)
return;
- v8SetReturnValueString(info, element, info.GetIsolate());
+ v8SetReturnValueFast(info, element.release(), collection);
}
static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -278,12 +281,12 @@ static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
AtomicString propertyName = toCoreAtomicString(name);
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
- String element = collection->namedItem(propertyName, exceptionState);
+ RefPtr<TestInterfaceEmpty> element = collection->namedItem(propertyName, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- if (element.isNull())
+ if (!element)
return;
- v8SetReturnValueString(info, element, info.GetIsolate());
+ v8SetReturnValueFast(info, element.release(), collection);
}
static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
« no previous file with comments | « Source/bindings/tests/idls/TestSpecialOperationsInt.idl ('k') | Source/bindings/tests/results/V8TestSpecialOperationsInt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698