| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 } | 868 } |
| 869 } | 869 } |
| 870 | 870 |
| 871 | 871 |
| 872 ReplaceResultBuilder.prototype.generate = function() { | 872 ReplaceResultBuilder.prototype.generate = function() { |
| 873 var elements = this.elements; | 873 var elements = this.elements; |
| 874 return %StringBuilderConcat(elements, elements.length, this.special_string); | 874 return %StringBuilderConcat(elements, elements.length, this.special_string); |
| 875 } | 875 } |
| 876 | 876 |
| 877 | 877 |
| 878 function StringToJSON(key) { | |
| 879 return CheckJSONPrimitive(this.valueOf()); | |
| 880 } | |
| 881 | |
| 882 | |
| 883 // ------------------------------------------------------------------- | 878 // ------------------------------------------------------------------- |
| 884 | 879 |
| 885 function SetupString() { | 880 function SetupString() { |
| 886 // Setup the constructor property on the String prototype object. | 881 // Setup the constructor property on the String prototype object. |
| 887 %SetProperty($String.prototype, "constructor", $String, DONT_ENUM); | 882 %SetProperty($String.prototype, "constructor", $String, DONT_ENUM); |
| 888 | 883 |
| 889 | 884 |
| 890 // Setup the non-enumerable functions on the String object. | 885 // Setup the non-enumerable functions on the String object. |
| 891 InstallFunctions($String, DONT_ENUM, $Array( | 886 InstallFunctions($String, DONT_ENUM, $Array( |
| 892 "fromCharCode", StringFromCharCode | 887 "fromCharCode", StringFromCharCode |
| (...skipping 29 matching lines...) Expand all Loading... |
| 922 "fontcolor", StringFontcolor, | 917 "fontcolor", StringFontcolor, |
| 923 "fontsize", StringFontsize, | 918 "fontsize", StringFontsize, |
| 924 "big", StringBig, | 919 "big", StringBig, |
| 925 "blink", StringBlink, | 920 "blink", StringBlink, |
| 926 "bold", StringBold, | 921 "bold", StringBold, |
| 927 "fixed", StringFixed, | 922 "fixed", StringFixed, |
| 928 "italics", StringItalics, | 923 "italics", StringItalics, |
| 929 "small", StringSmall, | 924 "small", StringSmall, |
| 930 "strike", StringStrike, | 925 "strike", StringStrike, |
| 931 "sub", StringSub, | 926 "sub", StringSub, |
| 932 "sup", StringSup, | 927 "sup", StringSup |
| 933 "toJSON", StringToJSON | |
| 934 )); | 928 )); |
| 935 } | 929 } |
| 936 | 930 |
| 937 | 931 |
| 938 SetupString(); | 932 SetupString(); |
| OLD | NEW |