[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
snej at chromium.org
snej at chromium.org
Thu Dec 3 13:32:37 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit bfb7ba290f3cc86cb7dc751294f9159ee99fc369
Author: snej at chromium.org <snej at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 11 19:53:19 2009 +0000
Make V8 bindings return NULL handles instead of calling v8::Undefined(). This has equivalent
meaning to the caller, saves code, and appears to save a few cycles at runtime too.
https://bugs.webkit.org/show_bug.cgi?id=31367
Reviewed by Dimitri Glazkov.
* bindings/scripts/CodeGeneratorV8.pm: Change "v8::Undefined()" to "v8::Handle<v8::Value>()"
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f43053d..eac02bb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,16 @@
Reviewed by Dimitri Glazkov.
+ Make V8 bindings return NULL handles instead of calling v8::Undefined(). This has equivalent
+ meaning to the caller, saves code, and appears to save a few cycles at runtime too.
+ https://bugs.webkit.org/show_bug.cgi?id=31367
+
+ * bindings/scripts/CodeGeneratorV8.pm: Change "v8::Undefined()" to "v8::Handle<v8::Value>()"
+
+2009-11-11 Jens Alfke <snej at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
Optimize V8 getDOMNodeMap(), a hot function in Dromaeo DOM tests, by increasing inlining.
* bindings/v8/DOMData.cpp:
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index c81ac6d..fc3b29c 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -441,7 +441,7 @@ END
return V8DOMWrapper::getConstructor(type, workerContext);
END
} else {
- push(@implContentDecls, " return v8::Undefined();");
+ push(@implContentDecls, " return v8::Handle<v8::Value>();");
}
push(@implContentDecls, <<END);
@@ -522,7 +522,7 @@ END
# perform lookup first
push(@implContentDecls, <<END);
v8::Handle<v8::Object> holder = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::$classIndex, info.This());
- if (holder.IsEmpty()) return v8::Undefined();
+ if (holder.IsEmpty()) return v8::Handle<v8::Value>();
END
}
HolderToNative($dataNode, $implClassName, $classIndex);
@@ -535,9 +535,9 @@ END
# Generate security checks if necessary
if ($attribute->signature->extendedAttributes->{"CheckNodeSecurity"}) {
- push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->$attrName())) return v8::Undefined();\n\n");
+ push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->$attrName())) return v8::Handle<v8::Value>();\n\n");
} elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) {
- push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->contentDocument())) return v8::Undefined();\n\n");
+ push(@implContentDecls, " if (!V8Proxy::checkNodeSecurity(imp->contentDocument())) return v8::Handle<v8::Value>();\n\n");
}
my $useExceptions = 1 if @{$attribute->getterExceptions} and !($isPodType);
@@ -617,7 +617,7 @@ END
} else {
if ($attribute->signature->type eq "EventListener" && $dataNode->name eq "DOMWindow") {
push(@implContentDecls, " if (!imp->document())\n");
- push(@implContentDecls, " return v8::Undefined();\n");
+ push(@implContentDecls, " return v8::Handle<v8::Value>();\n");
}
if ($useExceptions) {
@@ -849,7 +849,7 @@ sub GenerateFunctionCallback
if ($function->signature->extendedAttributes->{"RequiresAllArguments"}) {
push(@implContentDecls,
- " if (args.Length() < $numParameters) return v8::Undefined();\n");
+ " if (args.Length() < $numParameters) return v8::Handle<v8::Value>();\n");
}
if (IsPodType($implClassName)) {
@@ -871,7 +871,7 @@ END
# We have not find real use cases yet.
push(@implContentDecls,
" if (!V8Proxy::canAccessFrame(imp->frame(), true)) {\n".
-" return v8::Undefined();\n" .
+" return v8::Handle<v8::Value>();\n" .
" }\n");
}
@@ -891,7 +891,7 @@ END
if ($function->signature->extendedAttributes->{"SVGCheckSecurityDocument"}) {
push(@implContentDecls,
" if (!V8Proxy::checkNodeSecurity(imp->getSVGDocument(ec)))\n" .
-" return v8::Undefined();\n");
+" return v8::Handle<v8::Value>();\n");
}
my $paramIndex = 0;
@@ -2124,7 +2124,7 @@ sub ReturnNativeToJSValue
return "return v8::Date::New(static_cast<double>($value))" if $type eq "DOMTimeStamp";
return "return $value ? v8::True() : v8::False()" if $type eq "boolean";
- return "return v8::Undefined()" if $type eq "void";
+ return "return v8::Handle<v8::Value>()" if $type eq "void";
# For all the types where we use 'int' as the representation type,
# we use Integer::New which has a fast Smi conversion check.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list