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

Unified Diff: src/api.cc

Issue 7309004: Fix bug 1529: check for NULL handle in v8::TryCatch::StackTrace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | test/mjsunit/regress/regress-1529.js » ('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 d968bff57065fd5fa80816ddee9a82ba48faf01c..71a715c1bb28b20189b91421f7605518f9174f98 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1682,7 +1682,9 @@ v8::Local<Value> v8::TryCatch::StackTrace() const {
i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_);
i::Handle<i::String> name = isolate_->factory()->LookupAsciiSymbol("stack");
if (!obj->HasProperty(*name)) return v8::Local<Value>();
- return v8::Utils::ToLocal(scope.CloseAndEscape(i::GetProperty(obj, name)));
+ i::Handle<i::Object> value = i::GetProperty(obj, name);
+ if (value.is_null()) return v8::Local<Value>();
+ return v8::Utils::ToLocal(scope.CloseAndEscape(value));
} else {
return v8::Local<Value>();
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1529.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698