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

Unified Diff: Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp

Issue 12377018: Revert 144157 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1425/
Patch Set: Created 7 years, 10 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/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
===================================================================
--- Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp (revision 144312)
+++ Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp (working copy)
@@ -45,7 +45,7 @@
WrapperTypeInfo V8HTMLImageElementConstructor::info = { V8HTMLImageElementConstructor::GetTemplate, V8HTMLImageElement::derefObject, 0, V8HTMLImageElement::toEventTarget, 0, V8HTMLImageElement::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype };
-static v8::Handle<v8::Value> namedConstructor(const v8::Arguments& args)
+static v8::Handle<v8::Value> v8HTMLImageElementConstructorMethodCustom(const v8::Arguments& args)
{
if (!args.IsConstructCall())
return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
@@ -81,11 +81,6 @@
return wrapper;
}
-static v8::Handle<v8::Value> namedConstructorCallback(const v8::Arguments& args)
-{
- return namedConstructor(args);
-}
-
v8::Persistent<v8::FunctionTemplate> V8HTMLImageElementConstructor::GetTemplate(v8::Isolate* isolate)
{
static v8::Persistent<v8::FunctionTemplate> cachedTemplate;
@@ -93,7 +88,7 @@
return cachedTemplate;
v8::HandleScope scope;
- v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(namedConstructorCallback);
+ v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(v8HTMLImageElementConstructorMethodCustom);
v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
instance->SetInternalFieldCount(V8HTMLImageElement::internalFieldCount);
« no previous file with comments | « Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698