Commit ba9bf72a authored by jochen@chromium.org's avatar jochen@chromium.org

Avoid unnecessary data race on FLAG_track_double_fields

BUG=none
R=svenpanne@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/639723002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c5c02d3b
......@@ -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_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment