diff options
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/bindings/scripts/CodeGeneratorV8.pm | 31 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_binding.h | 7 | ||||
-rw-r--r-- | webkit/port/platform/TemporaryLinkStubs.cpp | 5 |
3 files changed, 27 insertions, 16 deletions
diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm index e617d6e..009b87e 100644 --- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm +++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm @@ -425,6 +425,8 @@ sub GenerateNormalAttrGetter } } + 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 @@ END 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 @@ END 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"; } diff --git a/webkit/port/bindings/v8/v8_binding.h b/webkit/port/bindings/v8/v8_binding.h index f5edfc4..81d7dde 100644 --- a/webkit/port/bindings/v8/v8_binding.h +++ b/webkit/port/bindings/v8/v8_binding.h @@ -5,6 +5,7 @@ #ifndef V8_BINDING_H__ #define V8_BINDING_H__ +#include "base/compiler_specific.h" #include "build/build_config.h" #include <v8.h> @@ -14,9 +15,9 @@ // Suppress warnings in CString of converting size_t to unsigned int. // TODO(fqian): fix CString.h. -#pragma warning(push, 0) +MSVC_PUSH_WARNING_LEVEL(0); #include "CString.h" -#pragma warning(pop) +MSVC_POP_WARNING(); #if defined(OS_LINUX) // Use the platform.h for linux. @@ -133,7 +134,7 @@ inline int ToInt32(v8::Handle<v8::Value> value) { // If a WebCore string length is greater than the threshold, // v8String creates an external string to avoid allocating // the string in the large object space (which has a high memory overhead). -static const int kV8ExternalStringThreshold = 2048; +static const unsigned int kV8ExternalStringThreshold = 2048; // Convert a string to a V8 string. inline v8::Handle<v8::String> v8String(const String& str) { diff --git a/webkit/port/platform/TemporaryLinkStubs.cpp b/webkit/port/platform/TemporaryLinkStubs.cpp index 341b043..34fb5f3 100644 --- a/webkit/port/platform/TemporaryLinkStubs.cpp +++ b/webkit/port/platform/TemporaryLinkStubs.cpp @@ -24,16 +24,17 @@ */ #include "config.h" +#include "base/compiler_specific.h" #define WIN32_COMPILE_HACK -#pragma warning(push, 0) +MSVC_PUSH_WARNING_LEVEL(0); #include "Color.h" #include "SSLKeyGenerator.h" #include "KURL.h" #include "NotImplemented.h" #include "SharedBuffer.h" -#pragma warning(pop) +MSVC_POP_WARNING(); using namespace WebCore; |