OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 var script = %FunctionGetScript(this[CallSiteFunctionKey]); | 899 var script = %FunctionGetScript(this[CallSiteFunctionKey]); |
900 return script ? (script.type == TYPE_NATIVE) : false; | 900 return script ? (script.type == TYPE_NATIVE) : false; |
901 } | 901 } |
902 | 902 |
903 function CallSiteGetPosition() { | 903 function CallSiteGetPosition() { |
904 return this[CallSitePositionKey]; | 904 return this[CallSitePositionKey]; |
905 } | 905 } |
906 | 906 |
907 function CallSiteIsConstructor() { | 907 function CallSiteIsConstructor() { |
908 var receiver = this[CallSiteReceiverKey]; | 908 var receiver = this[CallSiteReceiverKey]; |
909 var constructor = | 909 var constructor = (receiver != null && IS_OBJECT(receiver)) |
910 IS_OBJECT(receiver) ? %GetDataProperty(receiver, "constructor") : null; | 910 ? %GetDataProperty(receiver, "constructor") : null; |
911 if (!constructor) return false; | 911 if (!constructor) return false; |
912 return this[CallSiteFunctionKey] === constructor; | 912 return this[CallSiteFunctionKey] === constructor; |
913 } | 913 } |
914 | 914 |
915 function CallSiteToString() { | 915 function CallSiteToString() { |
916 var fileName; | 916 var fileName; |
917 var fileLocation = ""; | 917 var fileLocation = ""; |
918 if (this.isNative()) { | 918 if (this.isNative()) { |
919 fileLocation = "native"; | 919 fileLocation = "native"; |
920 } else { | 920 } else { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 %SetOverflowedStackTrace(this, void 0); | 1325 %SetOverflowedStackTrace(this, void 0); |
1326 } | 1326 } |
1327 | 1327 |
1328 %DefineOrRedefineAccessorProperty( | 1328 %DefineOrRedefineAccessorProperty( |
1329 boilerplate, 'stack', getter, setter, DONT_ENUM); | 1329 boilerplate, 'stack', getter, setter, DONT_ENUM); |
1330 | 1330 |
1331 return boilerplate; | 1331 return boilerplate; |
1332 } | 1332 } |
1333 | 1333 |
1334 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1334 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |