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

Side by Side Diff: Source/bindings/scripts/deprecated_code_generator_v8.pm

Issue 23799009: Always pass v8::Isolate to v8::Number::New() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
5 # Copyright (C) 2006 Apple Computer, Inc. 5 # Copyright (C) 2006 Apple Computer, Inc.
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. 10 # Copyright (C) 2012 Ericsson AB. All rights reserved.
(...skipping 5404 matching lines...) Expand 10 before | Expand all | Expand 10 after
5415 } 5415 }
5416 5416
5417 if ($type eq "Date") { 5417 if ($type eq "Date") {
5418 return "${indent}v8SetReturnValue(${getCallbackInfo}, v8DateOrNull($nati veValue, $getIsolate));" if $isReturnValue; 5418 return "${indent}v8SetReturnValue(${getCallbackInfo}, v8DateOrNull($nati veValue, $getIsolate));" if $isReturnValue;
5419 return "$indent$receiver v8DateOrNull($nativeValue, $getIsolate);" 5419 return "$indent$receiver v8DateOrNull($nativeValue, $getIsolate);"
5420 } 5420 }
5421 5421
5422 # long long and unsigned long long are not representable in ECMAScript. 5422 # long long and unsigned long long are not representable in ECMAScript.
5423 if ($type eq "long long" or $type eq "unsigned long long" or $type eq "DOMTi meStamp") { 5423 if ($type eq "long long" or $type eq "unsigned long long" or $type eq "DOMTi meStamp") {
5424 return "${indent}v8SetReturnValue(${getCallbackInfo}, static_cast<double >($nativeValue));" if $isReturnValue; 5424 return "${indent}v8SetReturnValue(${getCallbackInfo}, static_cast<double >($nativeValue));" if $isReturnValue;
5425 return "$indent$receiver v8::Number::New(static_cast<double>($nativeValu e));"; 5425 return "$indent$receiver v8::Number::New($getIsolate, static_cast<double >($nativeValue));";
5426 } 5426 }
5427 5427
5428 if (IsPrimitiveType($type)) { 5428 if (IsPrimitiveType($type)) {
5429 die "unexpected type $type" if not ($type eq "float" or $type eq "double "); 5429 die "unexpected type $type" if not ($type eq "float" or $type eq "double ");
5430 return "${indent}v8SetReturnValue(${getCallbackInfo}, ${nativeValue});" if $isReturnValue; 5430 return "${indent}v8SetReturnValue(${getCallbackInfo}, ${nativeValue});" if $isReturnValue;
5431 return "$indent$receiver v8::Number::New($nativeValue);"; 5431 return "$indent$receiver v8::Number::New($getIsolate, $nativeValue);";
5432 } 5432 }
5433 5433
5434 if ($nativeType eq "ScriptValue" or $nativeType eq "ScriptPromise") { 5434 if ($nativeType eq "ScriptValue" or $nativeType eq "ScriptPromise") {
5435 return "${indent}v8SetReturnValue(${getCallbackInfo}, ${nativeValue}.v8V alue());" if $isReturnValue; 5435 return "${indent}v8SetReturnValue(${getCallbackInfo}, ${nativeValue}.v8V alue());" if $isReturnValue;
5436 return "$indent$receiver $nativeValue.v8Value();"; 5436 return "$indent$receiver $nativeValue.v8Value();";
5437 } 5437 }
5438 5438
5439 my $conv = $extendedAttributes->{"TreatReturnedNullStringAs"}; 5439 my $conv = $extendedAttributes->{"TreatReturnedNullStringAs"};
5440 if (($type eq "DOMString" || IsEnumType($type)) && $isReturnValue) { 5440 if (($type eq "DOMString" || IsEnumType($type)) && $isReturnValue) {
5441 my $functionSuffix = ""; 5441 my $functionSuffix = "";
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6011 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6012 $found = 1; 6012 $found = 1;
6013 } 6013 }
6014 return 1 if $found; 6014 return 1 if $found;
6015 }, 0); 6015 }, 0);
6016 6016
6017 return $found; 6017 return $found;
6018 } 6018 }
6019 6019
6020 1; 6020 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698