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

Side by Side Diff: src/messages.h

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, 5 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/log.cc ('k') | src/messages.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 // The infrastructure used for (localized) message reporting in V8. 5 // The infrastructure used for (localized) message reporting in V8.
6 // 6 //
7 // Note: there's a big unresolved issue about ownership of the data 7 // Note: there's a big unresolved issue about ownership of the data
8 // structures used by this framework. 8 // structures used by this framework.
9 9
10 #ifndef V8_MESSAGES_H_ 10 #ifndef V8_MESSAGES_H_
11 #define V8_MESSAGES_H_ 11 #define V8_MESSAGES_H_
12 12
13 #include <memory>
14
13 #include "src/base/smart-pointers.h" 15 #include "src/base/smart-pointers.h"
14 #include "src/handles.h" 16 #include "src/handles.h"
15 #include "src/list.h" 17 #include "src/list.h"
16 18
17 namespace v8 { 19 namespace v8 {
18 namespace internal { 20 namespace internal {
19 21
20 // Forward declarations. 22 // Forward declarations.
21 class JSMessageObject; 23 class JSMessageObject;
22 class LookupIterator; 24 class LookupIterator;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 MessageLocation* location, Handle<Object> argument, 550 MessageLocation* location, Handle<Object> argument,
549 Handle<JSArray> stack_frames); 551 Handle<JSArray> stack_frames);
550 552
551 // Report a formatted message (needs JS allocation). 553 // Report a formatted message (needs JS allocation).
552 static void ReportMessage(Isolate* isolate, MessageLocation* loc, 554 static void ReportMessage(Isolate* isolate, MessageLocation* loc,
553 Handle<JSMessageObject> message); 555 Handle<JSMessageObject> message);
554 556
555 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, 557 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc,
556 Handle<Object> message_obj); 558 Handle<Object> message_obj);
557 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 559 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
558 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 560 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate,
559 Handle<Object> data); 561 Handle<Object> data);
560 }; 562 };
561 563
562 564
563 } // namespace internal 565 } // namespace internal
564 } // namespace v8 566 } // namespace v8
565 567
566 #endif // V8_MESSAGES_H_ 568 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698