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-test.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/string-stream.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 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/deoptimizer.h" 10 #include "src/deoptimizer.h"
9 #include "src/frames-inl.h" 11 #include "src/frames-inl.h"
10 #include "src/full-codegen/full-codegen.h" 12 #include "src/full-codegen/full-codegen.h"
11 #include "src/isolate-inl.h" 13 #include "src/isolate-inl.h"
12 #include "src/snapshot/natives.h" 14 #include "src/snapshot/natives.h"
13 15
14 namespace v8 { 16 namespace v8 {
15 namespace internal { 17 namespace internal {
16 18
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 base::OS::DebugBreak(); 394 base::OS::DebugBreak();
393 return isolate->heap()->undefined_value(); 395 return isolate->heap()->undefined_value();
394 } 396 }
395 397
396 398
397 // Sets a v8 flag. 399 // Sets a v8 flag.
398 RUNTIME_FUNCTION(Runtime_SetFlags) { 400 RUNTIME_FUNCTION(Runtime_SetFlags) {
399 SealHandleScope shs(isolate); 401 SealHandleScope shs(isolate);
400 DCHECK(args.length() == 1); 402 DCHECK(args.length() == 1);
401 CONVERT_ARG_CHECKED(String, arg, 0); 403 CONVERT_ARG_CHECKED(String, arg, 0);
402 base::SmartArrayPointer<char> flags = 404 std::unique_ptr<char[]> flags =
403 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); 405 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
404 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get())); 406 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get()));
405 return isolate->heap()->undefined_value(); 407 return isolate->heap()->undefined_value();
406 } 408 }
407 409
408 410
409 RUNTIME_FUNCTION(Runtime_Abort) { 411 RUNTIME_FUNCTION(Runtime_Abort) {
410 SealHandleScope shs(isolate); 412 SealHandleScope shs(isolate);
411 DCHECK(args.length() == 1); 413 DCHECK(args.length() == 1);
412 CONVERT_SMI_ARG_CHECKED(message_id, 0); 414 CONVERT_SMI_ARG_CHECKED(message_id, 0);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 591
590 RUNTIME_FUNCTION(Runtime_SpeciesProtector) { 592 RUNTIME_FUNCTION(Runtime_SpeciesProtector) {
591 SealHandleScope shs(isolate); 593 SealHandleScope shs(isolate);
592 DCHECK_EQ(0, args.length()); 594 DCHECK_EQ(0, args.length());
593 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact()); 595 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact());
594 } 596 }
595 597
596 598
597 } // namespace internal 599 } // namespace internal
598 } // namespace v8 600 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/string-stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698