Reviewers: Igor Sheludko,
Description:
Allow GetScriptNameOrSourceURL to be called with exception pending.
[email protected]
Please review this at https://codereview.chromium.org/235943006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -4 lines):
M src/handles.cc
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index
af1ffab59c3b2928da8ea35ebc90d24774dda3ca..a527dcdc590b98e63c940409e56edc79664d80a3
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 is already pending.
+ if (!Execution::TryCall(method, script_wrapper, 0,
NULL).ToHandle(&result)) {
+ return isolate->factory()->undefined_value();
+ }
return result;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.