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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1290063002: Debugger: do not expose global object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/debug/debug-scopes.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/debug/debug-evaluate.h" 9 #include "src/debug/debug-evaluate.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 if (!instance_filter->IsUndefined()) { 1392 if (!instance_filter->IsUndefined()) {
1393 for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd(); 1393 for (PrototypeIterator iter(isolate, obj); !iter.IsAtEnd();
1394 iter.Advance()) { 1394 iter.Advance()) {
1395 if (iter.GetCurrent() == instance_filter) { 1395 if (iter.GetCurrent() == instance_filter) {
1396 obj = NULL; // Don't add this object. 1396 obj = NULL; // Don't add this object.
1397 break; 1397 break;
1398 } 1398 }
1399 } 1399 }
1400 } 1400 }
1401 1401
1402 // Do not expose the global object directly.
1403 if (obj->IsJSGlobalObject()) {
1404 obj = JSGlobalObject::cast(obj)->global_proxy();
1405 }
1406
1402 if (obj != NULL) { 1407 if (obj != NULL) {
1403 // Valid reference found add to instance array if supplied an update 1408 // Valid reference found add to instance array if supplied an update
1404 // count. 1409 // count.
1405 if (instances != NULL && count < instances_size) { 1410 if (instances != NULL && count < instances_size) {
1406 instances->set(count, obj); 1411 instances->set(count, obj);
1407 } 1412 }
1408 last = obj; 1413 last = obj;
1409 count++; 1414 count++;
1410 } 1415 }
1411 } 1416 }
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 return *isolate->factory()->undefined_value(); 1827 return *isolate->factory()->undefined_value();
1823 } 1828 }
1824 1829
1825 1830
1826 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1831 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1827 UNIMPLEMENTED(); 1832 UNIMPLEMENTED();
1828 return NULL; 1833 return NULL;
1829 } 1834 }
1830 } // namespace internal 1835 } // namespace internal
1831 } // namespace v8 1836 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698