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

Unified Diff: src/bootstrapper.cc

Issue 639723002: Avoid unnecessary data race on FLAG_track_double_fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 405f6650648366a53aeb7d99ed951c4682aceaaf..795cd5235a9928000516860643013b5390ad548d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2590,20 +2590,24 @@ void Genesis::MakeFunctionInstancePrototypeWritable() {
class NoTrackDoubleFieldsForSerializerScope {
public:
explicit NoTrackDoubleFieldsForSerializerScope(Isolate* isolate)
- : flag_(FLAG_track_double_fields) {
+ : flag_(FLAG_track_double_fields), enabled_(false) {
if (isolate->serializer_enabled()) {
// Disable tracking double fields because heap numbers treated as
// immutable by the serializer.
FLAG_track_double_fields = false;
+ enabled_ = true;
}
}
~NoTrackDoubleFieldsForSerializerScope() {
- FLAG_track_double_fields = flag_;
+ if (enabled_) {
+ FLAG_track_double_fields = flag_;
+ }
}
private:
bool flag_;
+ bool enabled_;
};
« 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