OLD | NEW |
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } | 669 } |
670 } | 670 } |
671 | 671 |
672 return 0; | 672 return 0; |
673 } | 673 } |
674 | 674 |
675 sub GetV8StringResourceMode | 675 sub GetV8StringResourceMode |
676 { | 676 { |
677 my $extendedAttributes = shift; | 677 my $extendedAttributes = shift; |
678 | 678 |
679 # Blink uses the non-standard identifier NullString instead of Web IDL | 679 # In addition to [TreatNullAs=EmptyString], Blink also supports the non-stan
dard |
680 # standard EmptyString, in [TreatNullAs=NullString] and [TreatUndefinedAs=Nu
llString], | 680 # [TreatNullAs=NullString] and formerly-standard [TreatUndefinedAs=NullStrin
g]. |
681 # and does not support [TreatUndefinedAs=Null] or [TreatUndefinedAs=Missing] | |
682 # https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extende
d-attributes#TOC-TreatNullAs-a-p-TreatUndefinedAs-a-p- | 681 # https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extende
d-attributes#TOC-TreatNullAs-a-p-TreatUndefinedAs-a-p- |
683 my $mode = ""; | 682 my $mode = ""; |
684 if (($extendedAttributes->{"TreatNullAs"} and $extendedAttributes->{"TreatNu
llAs"} eq "NullString") and ($extendedAttributes->{"TreatUndefinedAs"} and $exte
ndedAttributes->{"TreatUndefinedAs"} eq "NullString")) { | 683 if ($extendedAttributes->{"TreatNullAs"} and $extendedAttributes->{"TreatNul
lAs"} eq "EmptyString") { |
| 684 $mode = "TreatNullAsEmptyString"; |
| 685 } elsif (($extendedAttributes->{"TreatNullAs"} and $extendedAttributes->{"Tr
eatNullAs"} eq "NullString") and ($extendedAttributes->{"TreatUndefinedAs"} and
$extendedAttributes->{"TreatUndefinedAs"} eq "NullString")) { |
685 $mode = "WithUndefinedOrNullCheck"; | 686 $mode = "WithUndefinedOrNullCheck"; |
686 } elsif ($extendedAttributes->{"TreatNullAs"} and $extendedAttributes->{"Tre
atNullAs"} eq "NullString") { | 687 } elsif ($extendedAttributes->{"TreatNullAs"} and $extendedAttributes->{"Tre
atNullAs"} eq "NullString") { |
687 $mode = "WithNullCheck"; | 688 $mode = "WithNullCheck"; |
688 } | 689 } |
689 return $mode; | 690 return $mode; |
690 } | 691 } |
691 | 692 |
692 sub GenerateHeader | 693 sub GenerateHeader |
693 { | 694 { |
694 my $object = shift; | 695 my $object = shift; |
(...skipping 5696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6391 if ($parameter->type eq "SerializedScriptValue") { | 6392 if ($parameter->type eq "SerializedScriptValue") { |
6392 return 1; | 6393 return 1; |
6393 } elsif (IsIntegerType($parameter->type)) { | 6394 } elsif (IsIntegerType($parameter->type)) { |
6394 return 1; | 6395 return 1; |
6395 } | 6396 } |
6396 } | 6397 } |
6397 return 0; | 6398 return 0; |
6398 } | 6399 } |
6399 | 6400 |
6400 1; | 6401 1; |
OLD | NEW |