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

Side by Side Diff: src/messages.js

Issue 1182303004: All private symbols are own symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix nits Created 5 years, 6 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
« no previous file with comments | « src/macros.py ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // ------------------------------------------------------------------- 5 // -------------------------------------------------------------------
6 6
7 var $errorToString; 7 var $errorToString;
8 var $getStackTraceLine; 8 var $getStackTraceLine;
9 var $messageGetPositionInLine; 9 var $messageGetPositionInLine;
10 var $messageGetLineNumber; 10 var $messageGetLineNumber;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 538
539 function GetStackTraceLine(recv, fun, pos, isGlobal) { 539 function GetStackTraceLine(recv, fun, pos, isGlobal) {
540 return new CallSite(recv, fun, pos, false).toString(); 540 return new CallSite(recv, fun, pos, false).toString();
541 } 541 }
542 542
543 // ---------------------------------------------------------------------------- 543 // ----------------------------------------------------------------------------
544 // Error implementation 544 // Error implementation
545 545
546 var CallSiteReceiverKey = NEW_PRIVATE_OWN("CallSite#receiver"); 546 var CallSiteReceiverKey = NEW_PRIVATE("CallSite#receiver");
547 var CallSiteFunctionKey = NEW_PRIVATE_OWN("CallSite#function"); 547 var CallSiteFunctionKey = NEW_PRIVATE("CallSite#function");
548 var CallSitePositionKey = NEW_PRIVATE_OWN("CallSite#position"); 548 var CallSitePositionKey = NEW_PRIVATE("CallSite#position");
549 var CallSiteStrictModeKey = NEW_PRIVATE_OWN("CallSite#strict_mode"); 549 var CallSiteStrictModeKey = NEW_PRIVATE("CallSite#strict_mode");
550 550
551 function CallSite(receiver, fun, pos, strict_mode) { 551 function CallSite(receiver, fun, pos, strict_mode) {
552 SET_PRIVATE(this, CallSiteReceiverKey, receiver); 552 SET_PRIVATE(this, CallSiteReceiverKey, receiver);
553 SET_PRIVATE(this, CallSiteFunctionKey, fun); 553 SET_PRIVATE(this, CallSiteFunctionKey, fun);
554 SET_PRIVATE(this, CallSitePositionKey, pos); 554 SET_PRIVATE(this, CallSitePositionKey, pos);
555 SET_PRIVATE(this, CallSiteStrictModeKey, strict_mode); 555 SET_PRIVATE(this, CallSiteStrictModeKey, strict_mode);
556 } 556 }
557 557
558 function CallSiteGetThis() { 558 function CallSiteGetThis() {
559 return GET_PRIVATE(this, CallSiteStrictModeKey) 559 return GET_PRIVATE(this, CallSiteStrictModeKey)
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 %_CallFunction(receiver, NoSideEffectsObjectToString); 856 %_CallFunction(receiver, NoSideEffectsObjectToString);
857 } 857 }
858 var constructorName = constructor.name; 858 var constructorName = constructor.name;
859 if (!constructorName) { 859 if (!constructorName) {
860 return requireConstructor ? null : 860 return requireConstructor ? null :
861 %_CallFunction(receiver, NoSideEffectsObjectToString); 861 %_CallFunction(receiver, NoSideEffectsObjectToString);
862 } 862 }
863 return constructorName; 863 return constructorName;
864 } 864 }
865 865
866 var formatted_stack_trace_symbol = NEW_PRIVATE_OWN("formatted stack trace"); 866 var formatted_stack_trace_symbol = NEW_PRIVATE("formatted stack trace");
867 867
868 868
869 // Format the stack trace if not yet done, and return it. 869 // Format the stack trace if not yet done, and return it.
870 // Cache the formatted stack trace on the holder. 870 // Cache the formatted stack trace on the holder.
871 var StackTraceGetter = function() { 871 var StackTraceGetter = function() {
872 var formatted_stack_trace = UNDEFINED; 872 var formatted_stack_trace = UNDEFINED;
873 var holder = this; 873 var holder = this;
874 while (holder) { 874 while (holder) {
875 var formatted_stack_trace = 875 var formatted_stack_trace =
876 GET_PRIVATE(holder, formatted_stack_trace_symbol); 876 GET_PRIVATE(holder, formatted_stack_trace_symbol);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 // Define accessors first, as this may fail and throw. 1083 // Define accessors first, as this may fail and throw.
1084 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter, 1084 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter,
1085 set: StackTraceSetter, 1085 set: StackTraceSetter,
1086 configurable: true }); 1086 configurable: true });
1087 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace); 1087 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace);
1088 }; 1088 };
1089 1089
1090 GlobalError.captureStackTrace = captureStackTrace; 1090 GlobalError.captureStackTrace = captureStackTrace;
1091 1091
1092 }); 1092 });
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698