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

Unified Diff: src/handles.cc

Issue 235943006: Allow GetScriptNameOrSourceURL to be called with exception pending. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: test case. Created 6 years, 8 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/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index af1ffab59c3b2928da8ea35ebc90d24774dda3ca..f70848f7bb37b23f2049e0bdc1b282bb1ec11b93 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -399,10 +399,11 @@ Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) {
ASSERT(property->IsJSFunction());
Handle<JSFunction> method = Handle<JSFunction>::cast(property);
Handle<Object> result;
- ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate, result,
- Execution::TryCall(method, script_wrapper, 0, NULL),
- isolate->factory()->undefined_value());
+ // Do not check against pending exception, since this function may be called
+ // when an exception has already been pending.
+ if (!Execution::TryCall(method, script_wrapper, 0, NULL).ToHandle(&result)) {
+ return isolate->factory()->undefined_value();
+ }
return result;
}
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698