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

Side by Side Diff: src/d8.js

Issue 1845833002: [d8] remove utility context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/d8.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 (function() {
5 "use strict"; 6 "use strict";
6 7
7 // A more universal stringify that supports more types than JSON. 8 // A more universal stringify that supports more types than JSON.
8 // Used by the d8 shell to output results. 9 // Used by the d8 shell to output results.
9 var stringifyDepthLimit = 4; // To avoid crashing on cyclic objects 10 var stringifyDepthLimit = 4; // To avoid crashing on cyclic objects
10 11
11 // Hacky solution to circumvent forcing --allow-natives-syntax for d8 12 // Hacky solution to circumvent forcing --allow-natives-syntax for d8
12 function isProxy(o) { return false }; 13 function isProxy(o) { return false };
13 function JSProxyGetTarget(proxy) { }; 14 function JSProxyGetTarget(proxy) { };
14 function JSProxyGetHandler(proxy) { }; 15 function JSProxyGetHandler(proxy) { };
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 83 }
83 84
84 function StringifyProxy(proxy, depth) { 85 function StringifyProxy(proxy, depth) {
85 var proxy_type = typeof proxy; 86 var proxy_type = typeof proxy;
86 var info_object = { 87 var info_object = {
87 target: JSProxyGetTarget(proxy), 88 target: JSProxyGetTarget(proxy),
88 handler: JSProxyGetHandler(proxy) 89 handler: JSProxyGetHandler(proxy)
89 } 90 }
90 return '[' + proxy_type + ' Proxy ' + Stringify(info_object, depth-1) + ']'; 91 return '[' + proxy_type + ' Proxy ' + Stringify(info_object, depth-1) + ']';
91 } 92 }
93
94 return Stringify;
95 })();
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698