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

Side by Side Diff: src/isolate.h

Issue 217013002: Revert r20335 - "Raise StackOverflow during bootstrapping" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/bootstrapper.cc ('k') | test/cctest/test-api.cc » ('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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 1431
1432 // Support for checking for stack-overflows in C++ code. 1432 // Support for checking for stack-overflows in C++ code.
1433 class StackLimitCheck BASE_EMBEDDED { 1433 class StackLimitCheck BASE_EMBEDDED {
1434 public: 1434 public:
1435 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } 1435 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1436 1436
1437 bool HasOverflowed() const { 1437 bool HasOverflowed() const {
1438 StackGuard* stack_guard = isolate_->stack_guard(); 1438 StackGuard* stack_guard = isolate_->stack_guard();
1439 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit()); 1439 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit());
1440 } 1440 }
1441 bool WillOverflow(uint32_t additionalUsage) const {
1442 StackGuard* stack_guard = isolate_->stack_guard();
1443 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit() +
1444 additionalUsage);
1445 }
1446 private: 1441 private:
1447 Isolate* isolate_; 1442 Isolate* isolate_;
1448 }; 1443 };
1449 1444
1450 1445
1451 // Support for temporarily postponing interrupts. When the outermost 1446 // Support for temporarily postponing interrupts. When the outermost
1452 // postpone scope is left the interrupts will be re-enabled and any 1447 // postpone scope is left the interrupts will be re-enabled and any
1453 // interrupts that occurred while in the scope will be taken into 1448 // interrupts that occurred while in the scope will be taken into
1454 // account. 1449 // account.
1455 class PostponeInterruptsScope BASE_EMBEDDED { 1450 class PostponeInterruptsScope BASE_EMBEDDED {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 } 1532 }
1538 1533
1539 EmbeddedVector<char, 128> filename_; 1534 EmbeddedVector<char, 128> filename_;
1540 FILE* file_; 1535 FILE* file_;
1541 int scope_depth_; 1536 int scope_depth_;
1542 }; 1537 };
1543 1538
1544 } } // namespace v8::internal 1539 } } // namespace v8::internal
1545 1540
1546 #endif // V8_ISOLATE_H_ 1541 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698