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

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

Issue 78713009: Introduce toV8NoInline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/V8TestPromiseResolutionTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestConditionalInterface.cpp b/Source/bindings/tests/results/V8TestPromiseResolutionTarget.cpp
similarity index 68%
copy from Source/bindings/tests/results/V8TestConditionalInterface.cpp
copy to Source/bindings/tests/results/V8TestPromiseResolutionTarget.cpp
index 5af8cf2d7a3580ff1644dcd7456759b30efb56b2..3cb8eebf79da1afc443c7670924d71f8527e8cf2 100644
--- a/Source/bindings/tests/results/V8TestConditionalInterface.cpp
+++ b/Source/bindings/tests/results/V8TestPromiseResolutionTarget.cpp
@@ -31,11 +31,11 @@
// This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
#include "config.h"
-#if ENABLE(CONDITION)
-#include "V8TestConditionalInterface.h"
+#include "V8TestPromiseResolutionTarget.h"
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ScriptController.h"
+#include "bindings/v8/ScriptPromiseResolver.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8DOMWrapper.h"
@@ -46,10 +46,10 @@
namespace WebCore {
-static void initializeScriptWrappableForInterface(TestConditionalInterface* object)
+static void initializeScriptWrappableForInterface(TestPromiseResolutionTarget* object)
{
if (ScriptWrappable::wrapperCanBeStoredInObject(object))
- ScriptWrappable::setTypeInfoInObject(object, &V8TestConditionalInterface::wrapperTypeInfo);
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestPromiseResolutionTarget::wrapperTypeInfo);
else
ASSERT_NOT_REACHED();
}
@@ -60,26 +60,26 @@ static void initializeScriptWrappableForInterface(TestConditionalInterface* obje
// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
// in the global namespace.
// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
-void webCoreInitializeScriptWrappableForInterface(WebCore::TestConditionalInterface* object)
+void webCoreInitializeScriptWrappableForInterface(WebCore::TestPromiseResolutionTarget* object)
{
WebCore::initializeScriptWrappableForInterface(object);
}
namespace WebCore {
-const WrapperTypeInfo V8TestConditionalInterface::wrapperTypeInfo = { V8TestConditionalInterface::GetTemplate, V8TestConditionalInterface::derefObject, 0, 0, 0, V8TestConditionalInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestPromiseResolutionTarget::wrapperTypeInfo = { V8TestPromiseResolutionTarget::GetTemplate, V8TestPromiseResolutionTarget::derefObject, 0, 0, 0, V8TestPromiseResolutionTarget::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
-namespace TestConditionalInterfaceV8Internal {
+namespace TestPromiseResolutionTargetV8Internal {
template <typename T> void V8_USE(T) { }
-} // namespace TestConditionalInterfaceV8Internal
+} // namespace TestPromiseResolutionTargetV8Internal
-static v8::Handle<v8::FunctionTemplate> ConfigureV8TestConditionalInterfaceTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+static v8::Handle<v8::FunctionTemplate> ConfigureV8TestPromiseResolutionTargetTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
functionTemplate->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestConditionalInterface", v8::Local<v8::FunctionTemplate>(), V8TestConditionalInterface::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestPromiseResolutionTarget", v8::Local<v8::FunctionTemplate>(), V8TestPromiseResolutionTarget::internalFieldCount,
0, 0,
0, 0,
0, 0,
@@ -95,7 +95,7 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestConditionalInterfaceTempl
return functionTemplate;
}
-v8::Handle<v8::FunctionTemplate> V8TestConditionalInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+v8::Handle<v8::FunctionTemplate> V8TestPromiseResolutionTarget::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
@@ -105,27 +105,27 @@ v8::Handle<v8::FunctionTemplate> V8TestConditionalInterface::GetTemplate(v8::Iso
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
- ConfigureV8TestConditionalInterfaceTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
+ ConfigureV8TestPromiseResolutionTargetTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
return handleScope.Close(templ);
}
-bool V8TestConditionalInterface::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+bool V8TestPromiseResolutionTarget::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, currentWorldType);
}
-bool V8TestConditionalInterface::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
+bool V8TestPromiseResolutionTarget::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, MainWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, IsolatedWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, WorkerWorld);
}
-v8::Handle<v8::Object> V8TestConditionalInterface::createWrapper(PassRefPtr<TestConditionalInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+v8::Handle<v8::Object> V8TestPromiseResolutionTarget::createWrapper(PassRefPtr<TestPromiseResolutionTarget> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8TestConditionalInterface>(impl.get(), isolate));
+ ASSERT(!DOMDataStore::containsWrapper<V8TestPromiseResolutionTarget>(impl.get(), isolate));
if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
// Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
@@ -138,14 +138,25 @@ v8::Handle<v8::Object> V8TestConditionalInterface::createWrapper(PassRefPtr<Test
return wrapper;
installPerContextEnabledProperties(wrapper, impl.get(), isolate);
- V8DOMWrapper::associateObjectWithWrapper<V8TestConditionalInterface>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestPromiseResolutionTarget>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
return wrapper;
}
-void V8TestConditionalInterface::derefObject(void* object)
+void V8TestPromiseResolutionTarget::derefObject(void* object)
{
fromInternalPointer(object)->deref();
}
+template<>
+void ScriptPromiseResolver::resolve(TestPromiseResolutionTarget* impl, v8::Handle<v8::Object> creationContext)
+{
+ resolve(toV8(impl, creationContext, m_isolate));
+}
+
+template<>
+void ScriptPromiseResolver::reject(TestPromiseResolutionTarget* impl, v8::Handle<v8::Object> creationContext)
+{
+ reject(toV8(impl, creationContext, m_isolate));
+}
+
} // namespace WebCore
-#endif // ENABLE(CONDITION)

Powered by Google App Engine
This is Rietveld 408576698