Chromium Code Reviews| 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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
| 6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 void SetData(uint32_t slot, void* data) { | 979 void SetData(uint32_t slot, void* data) { |
| 980 DCHECK(slot < Internals::kNumIsolateDataSlots); | 980 DCHECK(slot < Internals::kNumIsolateDataSlots); |
| 981 embedder_data_[slot] = data; | 981 embedder_data_[slot] = data; |
| 982 } | 982 } |
| 983 void* GetData(uint32_t slot) { | 983 void* GetData(uint32_t slot) { |
| 984 DCHECK(slot < Internals::kNumIsolateDataSlots); | 984 DCHECK(slot < Internals::kNumIsolateDataSlots); |
| 985 return embedder_data_[slot]; | 985 return embedder_data_[slot]; |
| 986 } | 986 } |
| 987 | 987 |
| 988 bool serializer_enabled() const { return serializer_enabled_; } | 988 bool serializer_enabled() const { return serializer_enabled_; } |
| 989 bool snapshot_available() const { return snapshot_blob_ != NULL; } | 989 bool snapshot_available() const { |
| 990 return snapshot_blob_ != NULL && snapshot_blob_->raw_size != 0; | |
|
vogelheim
2015/04/01 17:02:13
When does this happen?
I'm a bit surprised. I don
Erik Corry
2015/04/01 17:07:29
This isn't the embedder giving us an empty snapsho
vogelheim
2015/04/01 17:21:09
Oh. :-(
I guess it shouldn't do that; but since i
| |
| 991 } | |
| 990 | 992 |
| 991 bool IsDead() { return has_fatal_error_; } | 993 bool IsDead() { return has_fatal_error_; } |
| 992 void SignalFatalError() { has_fatal_error_ = true; } | 994 void SignalFatalError() { has_fatal_error_ = true; } |
| 993 | 995 |
| 994 bool use_crankshaft() const; | 996 bool use_crankshaft() const; |
| 995 | 997 |
| 996 bool initialized_from_snapshot() { return initialized_from_snapshot_; } | 998 bool initialized_from_snapshot() { return initialized_from_snapshot_; } |
| 997 | 999 |
| 998 double time_millis_since_init() { | 1000 double time_millis_since_init() { |
| 999 return base::OS::TimeCurrentMillis() - time_millis_at_init_; | 1001 return base::OS::TimeCurrentMillis() - time_millis_at_init_; |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1567 } | 1569 } |
| 1568 | 1570 |
| 1569 EmbeddedVector<char, 128> filename_; | 1571 EmbeddedVector<char, 128> filename_; |
| 1570 FILE* file_; | 1572 FILE* file_; |
| 1571 int scope_depth_; | 1573 int scope_depth_; |
| 1572 }; | 1574 }; |
| 1573 | 1575 |
| 1574 } } // namespace v8::internal | 1576 } } // namespace v8::internal |
| 1575 | 1577 |
| 1576 #endif // V8_ISOLATE_H_ | 1578 #endif // V8_ISOLATE_H_ |
| OLD | NEW |