| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index c0420a273fbf030439dc4471a3daa66091026e8a..ef4b799eb175c09fad0a0761302fcdf623c3af16 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -1329,24 +1329,21 @@ void FindBreakablePositions(Handle<DebugInfo> debug_info, int start_position,
|
| bool Debug::GetPossibleBreakpoints(Handle<Script> script, int start_position,
|
| int end_position, std::set<int>* positions) {
|
| while (true) {
|
| - if (!script->shared_function_infos()->IsWeakFixedArray()) return false;
|
| -
|
| - WeakFixedArray* infos =
|
| - WeakFixedArray::cast(script->shared_function_infos());
|
| + FixedArray* infos = script->shared_function_infos();
|
| HandleScope scope(isolate_);
|
| List<Handle<SharedFunctionInfo>> candidates;
|
| - {
|
| - WeakFixedArray::Iterator iterator(infos);
|
| - SharedFunctionInfo* info;
|
| - while ((info = iterator.Next<SharedFunctionInfo>())) {
|
| - if (info->end_position() < start_position ||
|
| - info->start_position() >= end_position) {
|
| - continue;
|
| - }
|
| - if (!info->IsSubjectToDebugging()) continue;
|
| - if (!info->HasDebugCode() && !info->allows_lazy_compilation()) continue;
|
| - candidates.Add(i::handle(info));
|
| + for (int index = 0; index < infos->length(); ++index) {
|
| + Object* raw = infos->get(index);
|
| + if (raw->IsSmi() || WeakCell::cast(raw)->cleared()) continue;
|
| + SharedFunctionInfo* info =
|
| + SharedFunctionInfo::cast(WeakCell::cast(raw)->value());
|
| + if (info->end_position() < start_position ||
|
| + info->start_position() >= end_position) {
|
| + continue;
|
| }
|
| + if (!info->IsSubjectToDebugging()) continue;
|
| + if (!info->HasDebugCode() && !info->allows_lazy_compilation()) continue;
|
| + candidates.Add(i::handle(info));
|
| }
|
|
|
| bool was_compiled = false;
|
| @@ -1455,15 +1452,16 @@ Handle<Object> Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
|
| // find the inner most function containing this position.
|
| // If there is no shared function info for this script at all, there is
|
| // no point in looking for it by walking the heap.
|
| - if (!script->shared_function_infos()->IsWeakFixedArray()) break;
|
|
|
| SharedFunctionInfo* shared;
|
| {
|
| SharedFunctionInfoFinder finder(position);
|
| - WeakFixedArray::Iterator iterator(script->shared_function_infos());
|
| - SharedFunctionInfo* candidate;
|
| - while ((candidate = iterator.Next<SharedFunctionInfo>())) {
|
| - finder.NewCandidate(candidate);
|
| + FixedArray* infos = script->shared_function_infos();
|
| + for (int index = 0; index < infos->length(); ++index) {
|
| + Object* raw = infos->get(index);
|
| + if (raw->IsSmi() || WeakCell::cast(raw)->cleared()) continue;
|
| + finder.NewCandidate(
|
| + SharedFunctionInfo::cast(WeakCell::cast(raw)->value()));
|
| }
|
| shared = finder.Result();
|
| if (shared == NULL) break;
|
|
|