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

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

Issue 1309673003: Small MessageLocation related refactoring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: keep old default values 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/messages.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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 isolate, isolate->CaptureAndSetSimpleStackTrace(error_object, caller)); 249 isolate, isolate->CaptureAndSetSimpleStackTrace(error_object, caller));
250 } 250 }
251 return isolate->heap()->undefined_value(); 251 return isolate->heap()->undefined_value();
252 } 252 }
253 253
254 254
255 RUNTIME_FUNCTION(Runtime_RenderCallSite) { 255 RUNTIME_FUNCTION(Runtime_RenderCallSite) {
256 HandleScope scope(isolate); 256 HandleScope scope(isolate);
257 DCHECK(args.length() == 0); 257 DCHECK(args.length() == 0);
258 MessageLocation location; 258 MessageLocation location;
259 isolate->ComputeLocation(&location); 259 if (!isolate->ComputeLocation(&location)) {
260 if (location.start_pos() == -1) return isolate->heap()->empty_string(); 260 return isolate->heap()->empty_string();
261 }
261 262
262 Zone zone; 263 Zone zone;
263 base::SmartPointer<ParseInfo> info( 264 base::SmartPointer<ParseInfo> info(
264 location.function()->shared()->is_function() 265 location.function()->shared()->is_function()
265 ? new ParseInfo(&zone, location.function()) 266 ? new ParseInfo(&zone, location.function())
266 : new ParseInfo(&zone, location.script())); 267 : new ParseInfo(&zone, location.script()));
267 268
268 if (!Parser::ParseStatic(info.get())) { 269 if (!Parser::ParseStatic(info.get())) {
269 isolate->clear_pending_exception(); 270 isolate->clear_pending_exception();
270 return isolate->heap()->empty_string(); 271 return isolate->heap()->empty_string();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 414 }
414 415
415 416
416 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { 417 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) {
417 HandleScope shs(isolate); 418 HandleScope shs(isolate);
418 return isolate->heap()->code_stub_exports_object(); 419 return isolate->heap()->code_stub_exports_object();
419 } 420 }
420 421
421 } // namespace internal 422 } // namespace internal
422 } // namespace v8 423 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698