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

Unified Diff: webkit/port/bindings/scripts/CodeGeneratorV8.pm

Issue 2418: Unignore most warnings on POSIX in build/SConscript.main. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « webkit/glue/webview_impl.h ('k') | webkit/port/bindings/v8/v8_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/scripts/CodeGeneratorV8.pm
===================================================================
--- webkit/port/bindings/scripts/CodeGeneratorV8.pm (revision 2109)
+++ webkit/port/bindings/scripts/CodeGeneratorV8.pm (working copy)
@@ -425,6 +425,8 @@
}
}
+ my $getterStringUsesImp = $implClassName ne "double";
+
# Getter
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
@@ -435,8 +437,12 @@
push(@implContentDecls, <<END);
V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());
$implClassName imp_instance = *imp_wrapper;
+END
+ if ($getterStringUsesImp) {
+ push(@implContentDecls, <<END);
$implClassName* imp = &imp_instance;
END
+ }
} elsif ($attrExt->{"v8OnProto"}) {
# perform lookup first
@@ -473,17 +479,20 @@
my $returnType = $codeGenerator->StripModule($attribute->signature->type);
- my $getterString = "imp->$getterFunc(";
- $getterString .= "ec" if $useExceptions;
- $getterString .= ")";
- if (IsRefPtrType($returnType)) {
- $implIncludes{"wtf/GetPtr.h"} = 1;
- $getterString = "WTF::getPtr(" . $getterString . ")";
- }
- if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) {
- $getterString .= ".toInt()";
- }
- if ($implClassName eq "double") {
+ my $getterString;
+ if ($getterStringUsesImp) {
+ $getterString = "imp->$getterFunc(";
+ $getterString .= "ec" if $useExceptions;
+ $getterString .= ")";
+ if (IsRefPtrType($returnType)) {
+ $implIncludes{"wtf/GetPtr.h"} = 1;
+ $getterString = "WTF::getPtr(" . $getterString . ")";
+ }
+ if ($nativeType eq "int" and
+ $attribute->signature->extendedAttributes->{"ConvertFromString"}) {
+ $getterString .= ".toInt()";
+ }
+ } else {
$getterString = "imp_instance";
}
« no previous file with comments | « webkit/glue/webview_impl.h ('k') | webkit/port/bindings/v8/v8_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698