Reviewers: brucedawson,
Description:
Debugger: rename variables to avoid shadowing.
[email protected]
Please review this at https://codereview.chromium.org/1212613006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+10, -9 lines):
M src/debug.cc
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index
fefccc893ffe03c145a933c982a3f3488fcf3d01..a689de08ae6c9e1dcc6f5d4a7076e7576414e87a
100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2061,8 +2061,7 @@ Handle<Object>
Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
for (int i = 0; i < array->Length(); i++) {
Object* item = array->Get(i);
if (!item->IsSharedFunctionInfo()) continue;
- SharedFunctionInfo* shared = SharedFunctionInfo::cast(item);
- finder.NewCandidate(shared);
+ finder.NewCandidate(SharedFunctionInfo::cast(item));
}
shared = finder.Result();
if (shared == NULL) break;
@@ -2081,18 +2080,20 @@ Handle<Object>
Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
HeapIterator it(isolate_->heap(), HeapIterator::kNoFiltering);
SharedFunctionInfoFinder finder(position);
while (HeapObject* object = it.next()) {
- JSFunction* closure = NULL;
- SharedFunctionInfo* shared = NULL;
+ JSFunction* candidate_closure = NULL;
+ SharedFunctionInfo* candidate = NULL;
if (object->IsJSFunction()) {
- closure = JSFunction::cast(object);
- shared = closure->shared();
+ candidate_closure = JSFunction::cast(object);
+ candidate = candidate_closure->shared();
} else if (object->IsSharedFunctionInfo()) {
- shared = SharedFunctionInfo::cast(object);
- if (!shared->allows_lazy_compilation_without_context()) continue;
+ candidate = SharedFunctionInfo::cast(object);
+ if (!candidate->allows_lazy_compilation_without_context())
continue;
} else {
continue;
}
- if (shared->script() == *script) finder.NewCandidate(shared,
closure);
+ if (candidate->script() == *script) {
+ finder.NewCandidate(candidate, candidate_closure);
+ }
}
closure = finder.ResultClosure();
shared = finder.Result();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.