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

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

Issue 1256283003: Fully deprecate FixedArray::CopySize method. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-cr-513507
Patch Set: Rebased. 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/contexts.cc ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/debug/debug-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ContextChainElement context_chain_element; 154 ContextChainElement context_chain_element;
155 context_chain_element.original_context = it.CurrentContext(); 155 context_chain_element.original_context = it.CurrentContext();
156 context_chain_element.materialized_object = materialized_function; 156 context_chain_element.materialized_object = materialized_function;
157 context_chain_element.scope_info = it.CurrentScopeInfo(); 157 context_chain_element.scope_info = it.CurrentScopeInfo();
158 context_chain_.Add(context_chain_element); 158 context_chain_.Add(context_chain_element);
159 159
160 stop = true; 160 stop = true;
161 RecordContextsInChain(&inner_context, with_context, with_context); 161 RecordContextsInChain(&inner_context, with_context, with_context);
162 } else if (scope_type == ScopeIterator::ScopeTypeCatch || 162 } else if (scope_type == ScopeIterator::ScopeTypeCatch ||
163 scope_type == ScopeIterator::ScopeTypeWith) { 163 scope_type == ScopeIterator::ScopeTypeWith) {
164 Handle<Context> cloned_context = 164 Handle<Context> cloned_context = Handle<Context>::cast(
165 Handle<Context>::cast(FixedArray::CopySize( 165 isolate->factory()->CopyFixedArray(it.CurrentContext()));
166 it.CurrentContext(), it.CurrentContext()->length()));
167 166
168 ContextChainElement context_chain_element; 167 ContextChainElement context_chain_element;
169 context_chain_element.original_context = it.CurrentContext(); 168 context_chain_element.original_context = it.CurrentContext();
170 context_chain_element.cloned_context = cloned_context; 169 context_chain_element.cloned_context = cloned_context;
171 context_chain_.Add(context_chain_element); 170 context_chain_.Add(context_chain_element);
172 171
173 RecordContextsInChain(&inner_context, cloned_context, cloned_context); 172 RecordContextsInChain(&inner_context, cloned_context, cloned_context);
174 } else if (scope_type == ScopeIterator::ScopeTypeBlock) { 173 } else if (scope_type == ScopeIterator::ScopeTypeBlock) {
175 Handle<JSObject> materialized_object = NewJSObjectWithNullProto(); 174 Handle<JSObject> materialized_object = NewJSObjectWithNullProto();
176 frame_inspector.MaterializeStackLocals(materialized_object, 175 frame_inspector.MaterializeStackLocals(materialized_object,
177 it.CurrentScopeInfo()); 176 it.CurrentScopeInfo());
178 if (it.HasContext()) { 177 if (it.HasContext()) {
179 Handle<Context> cloned_context = 178 Handle<Context> cloned_context = Handle<Context>::cast(
180 Handle<Context>::cast(FixedArray::CopySize( 179 isolate->factory()->CopyFixedArray(it.CurrentContext()));
181 it.CurrentContext(), it.CurrentContext()->length()));
182 Handle<Context> with_context = isolate->factory()->NewWithContext( 180 Handle<Context> with_context = isolate->factory()->NewWithContext(
183 function, cloned_context, materialized_object); 181 function, cloned_context, materialized_object);
184 182
185 ContextChainElement context_chain_element; 183 ContextChainElement context_chain_element;
186 context_chain_element.original_context = it.CurrentContext(); 184 context_chain_element.original_context = it.CurrentContext();
187 context_chain_element.cloned_context = cloned_context; 185 context_chain_element.cloned_context = cloned_context;
188 context_chain_element.materialized_object = materialized_object; 186 context_chain_element.materialized_object = materialized_object;
189 context_chain_element.scope_info = it.CurrentScopeInfo(); 187 context_chain_element.scope_info = it.CurrentScopeInfo();
190 context_chain_.Add(context_chain_element); 188 context_chain_.Add(context_chain_element);
191 189
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // to materialize. 308 // to materialize.
311 return target; 309 return target;
312 } 310 }
313 311
314 return isolate_->factory()->NewCatchContext( 312 return isolate_->factory()->NewCatchContext(
315 function, target, isolate_->factory()->this_string(), receiver); 313 function, target, isolate_->factory()->this_string(), receiver);
316 } 314 }
317 315
318 } // namespace internal 316 } // namespace internal
319 } // namespace v8 317 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698