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

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

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 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
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 <memory>
8
7 #include "src/arguments.h" 9 #include "src/arguments.h"
8 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
9 #include "src/bootstrapper.h" 11 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 12 #include "src/conversions.h"
11 #include "src/debug/debug.h" 13 #include "src/debug/debug.h"
12 #include "src/frames-inl.h" 14 #include "src/frames-inl.h"
13 #include "src/isolate-inl.h" 15 #include "src/isolate-inl.h"
14 #include "src/messages.h" 16 #include "src/messages.h"
15 #include "src/parsing/parser.h" 17 #include "src/parsing/parser.h"
16 #include "src/wasm/wasm-module.h" 18 #include "src/wasm/wasm-module.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 426 }
425 } 427 }
426 return false; 428 return false;
427 } 429 }
428 430
429 431
430 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { 432 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
431 MessageLocation location; 433 MessageLocation location;
432 if (ComputeLocation(isolate, &location)) { 434 if (ComputeLocation(isolate, &location)) {
433 Zone zone(isolate->allocator()); 435 Zone zone(isolate->allocator());
434 base::SmartPointer<ParseInfo> info( 436 std::unique_ptr<ParseInfo> info(
435 location.function()->shared()->is_function() 437 location.function()->shared()->is_function()
436 ? new ParseInfo(&zone, location.function()) 438 ? new ParseInfo(&zone, location.function())
437 : new ParseInfo(&zone, location.script())); 439 : new ParseInfo(&zone, location.script()));
438 if (Parser::ParseStatic(info.get())) { 440 if (Parser::ParseStatic(info.get())) {
439 CallPrinter printer(isolate, location.function()->shared()->IsBuiltin()); 441 CallPrinter printer(isolate, location.function()->shared()->IsBuiltin());
440 const char* string = printer.Print(info->literal(), location.start_pos()); 442 const char* string = printer.Print(info->literal(), location.start_pos());
441 if (strlen(string) > 0) { 443 if (strlen(string) > 0) {
442 return isolate->factory()->NewStringFromAsciiChecked(string); 444 return isolate->factory()->NewStringFromAsciiChecked(string);
443 } 445 }
444 } else { 446 } else {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 HandleScope scope(isolate); 580 HandleScope scope(isolate);
579 DCHECK_EQ(1, args.length()); 581 DCHECK_EQ(1, args.length());
580 CONVERT_ARG_CHECKED(Object, object, 0); 582 CONVERT_ARG_CHECKED(Object, object, 0);
581 bool is_wasm_object = 583 bool is_wasm_object =
582 object->IsJSObject() && wasm::IsWasmObject(JSObject::cast(object)); 584 object->IsJSObject() && wasm::IsWasmObject(JSObject::cast(object));
583 return *isolate->factory()->ToBoolean(is_wasm_object); 585 return *isolate->factory()->ToBoolean(is_wasm_object);
584 } 586 }
585 587
586 } // namespace internal 588 } // namespace internal
587 } // namespace v8 589 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698