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

Unified Diff: src/runtime.cc

Issue 18857: Skip the context extension object when locating objects referenced from anoth... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 11 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 | « no previous file | test/mjsunit/debug-referenced-by.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 1159)
+++ src/runtime.cc (working copy)
@@ -5736,7 +5736,6 @@
static int DebugReferencedBy(JSObject* target,
Object* instance_filter, int max_references,
FixedArray* instances, int instances_size,
- JSFunction* context_extension_function,
JSFunction* arguments_function) {
NoHandleAllocation ha;
AssertNoAllocation no_alloc;
@@ -5753,7 +5752,7 @@
// Skip context extension objects and argument arrays as these are
// checked in the context of functions using them.
JSObject* obj = JSObject::cast(heap_obj);
- if (obj->map()->constructor() == context_extension_function ||
+ if (obj->IsJSContextExtensionObject() ||
obj->map()->constructor() == arguments_function) {
continue;
}
@@ -5822,8 +5821,6 @@
RUNTIME_ASSERT(max_references >= 0);
// Get the constructor function for context extension and arguments array.
- JSFunction* context_extension_function =
- Top::context()->global_context()->context_extension_function();
JSObject* arguments_boilerplate =
Top::context()->global_context()->arguments_boilerplate();
JSFunction* arguments_function =
@@ -5832,8 +5829,7 @@
// Get the number of referencing objects.
int count;
count = DebugReferencedBy(target, instance_filter, max_references,
- NULL, 0,
- context_extension_function, arguments_function);
+ NULL, 0, arguments_function);
// Allocate an array to hold the result.
Object* object = Heap::AllocateFixedArray(count);
@@ -5842,8 +5838,7 @@
// Fill the referencing objects.
count = DebugReferencedBy(target, instance_filter, max_references,
- instances, count,
- context_extension_function, arguments_function);
+ instances, count, arguments_function);
// Return result as JS array.
Object* result =
« no previous file with comments | « no previous file | test/mjsunit/debug-referenced-by.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698