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

Unified Diff: src/messages.js

Issue 598603002: Change all V8 internal private symbols to be private own symbols. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased patch for landing Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/macros.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index d4375ef626aeabf9f427a46b1ac000f3547ed627..4d64d1e1319a1501dc4ae2357c33131e4036ebda 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -757,10 +757,10 @@ function GetStackTraceLine(recv, fun, pos, isGlobal) {
// ----------------------------------------------------------------------------
// Error implementation
-var CallSiteReceiverKey = NEW_PRIVATE("CallSite#receiver");
-var CallSiteFunctionKey = NEW_PRIVATE("CallSite#function");
-var CallSitePositionKey = NEW_PRIVATE("CallSite#position");
-var CallSiteStrictModeKey = NEW_PRIVATE("CallSite#strict_mode");
+var CallSiteReceiverKey = NEW_PRIVATE_OWN("CallSite#receiver");
+var CallSiteFunctionKey = NEW_PRIVATE_OWN("CallSite#function");
+var CallSitePositionKey = NEW_PRIVATE_OWN("CallSite#position");
+var CallSiteStrictModeKey = NEW_PRIVATE_OWN("CallSite#strict_mode");
function CallSite(receiver, fun, pos, strict_mode) {
SET_PRIVATE(this, CallSiteReceiverKey, receiver);
@@ -1115,16 +1115,21 @@ function GetTypeName(receiver, requireConstructor) {
var stack_trace_symbol; // Set during bootstrapping.
-var formatted_stack_trace_symbol = NEW_PRIVATE("formatted stack trace");
+var formatted_stack_trace_symbol = NEW_PRIVATE_OWN("formatted stack trace");
// Format the stack trace if not yet done, and return it.
// Cache the formatted stack trace on the holder.
var StackTraceGetter = function() {
- var formatted_stack_trace = GET_PRIVATE(this, formatted_stack_trace_symbol);
+ var formatted_stack_trace = UNDEFINED;
+ var holder = this;
+ while (holder && IS_UNDEFINED(formatted_stack_trace)) {
+ formatted_stack_trace = GET_PRIVATE(holder, formatted_stack_trace_symbol);
+ holder = %GetPrototype(holder);
+ }
if (IS_UNDEFINED(formatted_stack_trace)) {
- var holder = this;
- while (!HAS_PRIVATE(holder, stack_trace_symbol)) {
+ holder = this;
+ while (!HAS_DEFINED_PRIVATE(holder, stack_trace_symbol)) {
holder = %GetPrototype(holder);
if (!holder) return UNDEFINED;
}
« no previous file with comments | « src/macros.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698