@@ -30,44 +30,46 @@ IsolateData::IsolateData(Isolate* isolate,
30
30
uv_loop_t * event_loop,
31
31
MultiIsolatePlatform* platform,
32
32
uint32_t * zero_fill_field) :
33
-
34
- // Create string and private symbol properties as internalized one byte strings.
35
- //
36
- // Internalized because it makes property lookups a little faster and because
37
- // the string is created in the old space straight away. It's going to end up
38
- // in the old space sooner or later anyway but now it doesn't go through
39
- // v8::Eternal's new space handling first.
40
- //
41
- // One byte because our strings are ASCII and we can safely skip V8's UTF-8
42
- // decoding step. It's a one-time cost, but why pay it when you don't have to?
43
- #define V (PropertyName, StringValue ) \
44
- PropertyName ## _( \
45
- isolate, \
46
- Private::New ( \
47
- isolate, \
48
- String::NewFromOneByte ( \
49
- isolate, \
50
- reinterpret_cast <const uint8_t *>(StringValue), \
51
- v8::NewStringType::kInternalized, \
52
- sizeof(StringValue) - 1).ToLocalChecked())),
53
- PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES(V)
54
- #undef V
55
- #define V (PropertyName, StringValue ) \
56
- PropertyName ## _( \
57
- isolate, \
58
- String::NewFromOneByte ( \
59
- isolate, \
60
- reinterpret_cast <const uint8_t *>(StringValue), \
61
- v8::NewStringType::kInternalized, \
62
- sizeof(StringValue) - 1).ToLocalChecked()),
63
- PER_ISOLATE_STRING_PROPERTIES(V)
64
- #undef V
65
33
isolate_ (isolate),
66
34
event_loop_ (event_loop),
67
35
zero_fill_field_ (zero_fill_field),
68
36
platform_ (platform) {
69
37
if (platform_ != nullptr )
70
38
platform_->RegisterIsolate (this , event_loop);
39
+
40
+ // Create string and private symbol properties as internalized one byte
41
+ // strings after the platform is properly initialized.
42
+ //
43
+ // Internalized because it makes property lookups a little faster and
44
+ // because the string is created in the old space straight away. It's going
45
+ // to end up in the old space sooner or later anyway but now it doesn't go
46
+ // through v8::Eternal's new space handling first.
47
+ //
48
+ // One byte because our strings are ASCII and we can safely skip V8's UTF-8
49
+ // decoding step.
50
+
51
+ #define V (PropertyName, StringValue ) \
52
+ PropertyName ## _.Set ( \
53
+ isolate, \
54
+ Private::New ( \
55
+ isolate, \
56
+ String::NewFromOneByte ( \
57
+ isolate, \
58
+ reinterpret_cast <const uint8_t *>(StringValue), \
59
+ v8::NewStringType::kInternalized , \
60
+ sizeof (StringValue) - 1 ).ToLocalChecked ()));
61
+ PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES (V)
62
+ #undef V
63
+ #define V (PropertyName, StringValue ) \
64
+ PropertyName ## _.Set ( \
65
+ isolate, \
66
+ String::NewFromOneByte ( \
67
+ isolate, \
68
+ reinterpret_cast <const uint8_t *>(StringValue), \
69
+ v8::NewStringType::kInternalized , \
70
+ sizeof (StringValue) - 1 ).ToLocalChecked ());
71
+ PER_ISOLATE_STRING_PROPERTIES (V)
72
+ #undef V
71
73
}
72
74
73
75
IsolateData::~IsolateData () {
0 commit comments