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

Side by Side Diff: src/isolate.cc

Issue 176843003: Add StackOverflowError and expose error type to api. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix test Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/macros.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 result = callback(v8::Utils::ToLocal(receiver_handle), 862 result = callback(v8::Utils::ToLocal(receiver_handle),
863 index, 863 index,
864 type, 864 type,
865 v8::Utils::ToLocal(data)); 865 v8::Utils::ToLocal(data));
866 } 866 }
867 return result; 867 return result;
868 } 868 }
869 869
870 870
871 const char* const Isolate::kStackOverflowMessage = 871 const char* const Isolate::kStackOverflowMessage =
872 "Uncaught RangeError: Maximum call stack size exceeded"; 872 "Uncaught StackOverflowError: Maximum call stack size exceeded";
873 873
874 874
875 Failure* Isolate::StackOverflow() { 875 Failure* Isolate::StackOverflow() {
876 HandleScope scope(this); 876 HandleScope scope(this);
877 // At this point we cannot create an Error object using its javascript 877 // At this point we cannot create an Error object using its javascript
878 // constructor. Instead, we copy the pre-constructed boilerplate and 878 // constructor. Instead, we copy the pre-constructed boilerplate and
879 // attach the stack trace as a hidden property. 879 // attach the stack trace as a hidden property.
880 Handle<String> key = factory()->stack_overflow_string(); 880 Handle<String> key = factory()->stack_overflow_string();
881 Handle<JSObject> boilerplate = 881 Handle<JSObject> boilerplate =
882 Handle<JSObject>::cast(GetProperty(this, js_builtins_object(), key)); 882 Handle<JSObject>::cast(GetProperty(this, js_builtins_object(), key));
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 2316
2317 #ifdef DEBUG 2317 #ifdef DEBUG
2318 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2318 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2319 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2319 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2320 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2320 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2321 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2321 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2322 #undef ISOLATE_FIELD_OFFSET 2322 #undef ISOLATE_FIELD_OFFSET
2323 #endif 2323 #endif
2324 2324
2325 } } // namespace v8::internal 2325 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698