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

Unified Diff: src/api.cc

Issue 2761293002: Correctly annotate v8::StackTrace and v8::StackFrame API methods (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 170b45402ad9b9c6c2b81efaa101f669a9897021..08056605ed70caf7ece47f52a872685456bd13cf 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2841,7 +2841,7 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
Local<StackFrame> StackTrace::GetFrame(uint32_t index) const {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- ENTER_V8(isolate);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
auto self = Utils::OpenHandle(this);
auto obj = i::JSReceiver::GetElement(isolate, self, index).ToHandleChecked();
@@ -2865,10 +2865,7 @@ Local<StackTrace> StackTrace::CurrentStackTrace(
int frame_limit,
StackTraceOptions options) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- ENTER_V8(i_isolate);
- // TODO(dcarney): remove when ScriptDebugServer is fixed.
- options = static_cast<StackTraceOptions>(
- static_cast<int>(options) | kExposeFramesAcrossSecurityOrigins);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate);
i::Handle<i::JSArray> stackTrace =
i_isolate->CaptureCurrentStackTrace(frame_limit, options);
return Utils::StackTraceToLocal(stackTrace);
@@ -2880,7 +2877,7 @@ Local<StackTrace> StackTrace::CurrentStackTrace(
static int getIntProperty(const StackFrame* f, const char* propertyName,
int defaultValue) {
i::Isolate* isolate = Utils::OpenHandle(f)->GetIsolate();
- ENTER_V8(isolate);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
i::HandleScope scope(isolate);
i::Handle<i::JSObject> self = Utils::OpenHandle(f);
i::Handle<i::Object> obj =
@@ -2907,7 +2904,7 @@ int StackFrame::GetScriptId() const {
static Local<String> getStringProperty(const StackFrame* f,
const char* propertyName) {
i::Isolate* isolate = Utils::OpenHandle(f)->GetIsolate();
- ENTER_V8(isolate);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
i::Handle<i::JSObject> self = Utils::OpenHandle(f);
i::Handle<i::Object> obj =
@@ -2935,7 +2932,7 @@ Local<String> StackFrame::GetFunctionName() const {
static bool getBoolProperty(const StackFrame* f, const char* propertyName) {
i::Isolate* isolate = Utils::OpenHandle(f)->GetIsolate();
- ENTER_V8(isolate);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
i::HandleScope scope(isolate);
i::Handle<i::JSObject> self = Utils::OpenHandle(f);
i::Handle<i::Object> obj =
« no previous file with comments | « no previous file | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698