OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // Unreachable | 278 // Unreachable |
279 return factory()->empty_string(); | 279 return factory()->empty_string(); |
280 } | 280 } |
281 } | 281 } |
282 | 282 |
283 | 283 |
284 void Isolate::PushStackTraceAndDie(unsigned int magic, | 284 void Isolate::PushStackTraceAndDie(unsigned int magic, |
285 Object* object, | 285 Object* object, |
286 Map* map, | 286 Map* map, |
287 unsigned int magic2) { | 287 unsigned int magic2) { |
288 const int kMaxStackTraceSize = 8192; | 288 const int kMaxStackTraceSize = 32 * KB; |
289 Handle<String> trace = StackTraceString(); | 289 Handle<String> trace = StackTraceString(); |
290 uint8_t buffer[kMaxStackTraceSize]; | 290 uint8_t buffer[kMaxStackTraceSize]; |
291 int length = Min(kMaxStackTraceSize - 1, trace->length()); | 291 int length = Min(kMaxStackTraceSize - 1, trace->length()); |
292 String::WriteToFlat(*trace, buffer, 0, length); | 292 String::WriteToFlat(*trace, buffer, 0, length); |
293 buffer[length] = '\0'; | 293 buffer[length] = '\0'; |
294 // TODO(dcarney): convert buffer to utf8? | 294 // TODO(dcarney): convert buffer to utf8? |
295 base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2, | 295 base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2, |
296 static_cast<void*>(object), static_cast<void*>(map), | 296 static_cast<void*>(object), static_cast<void*>(map), |
297 reinterpret_cast<char*>(buffer)); | 297 reinterpret_cast<char*>(buffer)); |
298 base::OS::Abort(); | 298 base::OS::Abort(); |
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 if (prev_ && prev_->Intercept(flag)) return true; | 2659 if (prev_ && prev_->Intercept(flag)) return true; |
2660 // Then check whether this scope intercepts. | 2660 // Then check whether this scope intercepts. |
2661 if ((flag & intercept_mask_)) { | 2661 if ((flag & intercept_mask_)) { |
2662 intercepted_flags_ |= flag; | 2662 intercepted_flags_ |= flag; |
2663 return true; | 2663 return true; |
2664 } | 2664 } |
2665 return false; | 2665 return false; |
2666 } | 2666 } |
2667 | 2667 |
2668 } } // namespace v8::internal | 2668 } } // namespace v8::internal |
OLD | NEW |