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

Side by Side Diff: src/api.cc

Issue 711353002: Rename v8::Exception::GetMessage to CreateMessage. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added comments Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 6968 matching lines...) Expand 10 before | Expand all | Expand 10 after
6979 6979
6980 DEFINE_ERROR(RangeError) 6980 DEFINE_ERROR(RangeError)
6981 DEFINE_ERROR(ReferenceError) 6981 DEFINE_ERROR(ReferenceError)
6982 DEFINE_ERROR(SyntaxError) 6982 DEFINE_ERROR(SyntaxError)
6983 DEFINE_ERROR(TypeError) 6983 DEFINE_ERROR(TypeError)
6984 DEFINE_ERROR(Error) 6984 DEFINE_ERROR(Error)
6985 6985
6986 #undef DEFINE_ERROR 6986 #undef DEFINE_ERROR
6987 6987
6988 6988
6989 Local<Message> Exception::GetMessage(Handle<Value> exception) { 6989 Local<Message> Exception::CreateMessage(Handle<Value> exception) {
6990 i::Handle<i::Object> obj = Utils::OpenHandle(*exception); 6990 i::Handle<i::Object> obj = Utils::OpenHandle(*exception);
6991 if (!obj->IsHeapObject()) return Local<Message>(); 6991 if (!obj->IsHeapObject()) return Local<Message>();
6992 i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate(); 6992 i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate();
6993 ENTER_V8(isolate); 6993 ENTER_V8(isolate);
6994 i::HandleScope scope(isolate); 6994 i::HandleScope scope(isolate);
6995 return Utils::MessageToLocal( 6995 return Utils::MessageToLocal(
6996 scope.CloseAndEscape(isolate->CreateMessage(obj, NULL))); 6996 scope.CloseAndEscape(isolate->CreateMessage(obj, NULL)));
6997 } 6997 }
6998 6998
6999 6999
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
7787 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7787 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7788 Address callback_address = 7788 Address callback_address =
7789 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7789 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7790 VMState<EXTERNAL> state(isolate); 7790 VMState<EXTERNAL> state(isolate);
7791 ExternalCallbackScope call_scope(isolate, callback_address); 7791 ExternalCallbackScope call_scope(isolate, callback_address);
7792 callback(info); 7792 callback(info);
7793 } 7793 }
7794 7794
7795 7795
7796 } } // namespace v8::internal 7796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698