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

Unified Diff: src/isolate.cc

Issue 12600003: MIPS: fix NaN handling of Isolate::StackOverflow() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index f56f99b8f6d7355698f62f998191e0ac26dfb642..5f7b3f2d3b6134b0c8518d76eca776ad1d8b98fd 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1042,7 +1042,8 @@ Failure* Isolate::StackOverflow() {
Handle<Object> stack_trace_limit =
GetProperty(Handle<JSObject>::cast(error), "stackTraceLimit");
if (!stack_trace_limit->IsNumber()) return Failure::Exception();
- int limit = static_cast<int>(stack_trace_limit->Number());
+ double dlimit = stack_trace_limit->Number();
+ int limit = isnan(dlimit) ? 0 : static_cast<int>(dlimit);
Handle<JSArray> stack_trace = CaptureSimpleStackTrace(
exception, factory()->undefined_value(), limit);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698