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

Unified Diff: src/arm64/assembler-arm64.cc

Issue 240193002: Serializer enable/disable flags need thread safety. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 8 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
Index: src/arm64/assembler-arm64.cc
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc
index b399277543ff039911c1884e7c022d288fb401e7..0e5241281fe216a9eb8d9c8b92a4b025cb7982c4 100644
--- a/src/arm64/assembler-arm64.cc
+++ b/src/arm64/assembler-arm64.cc
@@ -274,9 +274,7 @@ void Operand::initialize_handle(Handle<Object> handle) {
bool Operand::NeedsRelocation() const {
if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) {
#ifdef DEBUG
- if (!Serializer::enabled()) {
- Serializer::TooLateToEnableNow();
- }
+ Serializer::TrySetPermanentlyDisabled();
#endif
return Serializer::enabled();
}
@@ -1971,7 +1969,7 @@ void Assembler::debug(const char* message, uint32_t code, Instr params) {
// might be run on real hardware.
if (!Serializer::enabled()) {
#ifdef DEBUG
- Serializer::TooLateToEnableNow();
+ Serializer::TrySetPermanentlyDisabled();
#endif
// The arguments to the debug marker need to be contiguous in memory, so
// make sure we don't try to emit pools.
@@ -2526,9 +2524,7 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
// Don't record external references unless the heap will be serialized.
if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
#ifdef DEBUG
- if (!Serializer::enabled()) {
- Serializer::TooLateToEnableNow();
- }
+ Serializer::TrySetPermanentlyDisabled();
#endif
if (!Serializer::enabled() && !emit_debug_code()) {
return;

Powered by Google App Engine
This is Rietveld 408576698