File tree Expand file tree Collapse file tree 5 files changed +9
-22
lines changed Expand file tree Collapse file tree 5 files changed +9
-22
lines changed Original file line number Diff line number Diff line change @@ -173,8 +173,8 @@ void LoadAsyncWrapperInfo(Environment* env) {
173
173
174
174
175
175
Local<Value> AsyncWrap::MakeCallback (const Local<Function> cb,
176
- int argc,
177
- Local<Value>* argv) {
176
+ int argc,
177
+ Local<Value>* argv) {
178
178
CHECK (env ()->context () == env ()->isolate ()->GetCurrentContext ());
179
179
180
180
Local<Function> pre_fn = env ()->async_hooks_pre_function ();
@@ -254,7 +254,6 @@ Local<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
254
254
env ()->tick_callback_function ()->Call (process, 0 , nullptr );
255
255
256
256
if (try_catch.HasCaught ()) {
257
- tick_info->set_last_threw (true );
258
257
return Undefined (env ()->isolate ());
259
258
}
260
259
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ inline uint32_t Environment::DomainFlag::count() const {
118
118
return fields_[kCount ];
119
119
}
120
120
121
- inline Environment::TickInfo::TickInfo () : in_tick_(false ), last_threw_( false ) {
121
+ inline Environment::TickInfo::TickInfo () : in_tick_(false ) {
122
122
for (int i = 0 ; i < kFieldsCount ; ++i)
123
123
fields_[i] = 0 ;
124
124
}
@@ -139,10 +139,6 @@ inline uint32_t Environment::TickInfo::index() const {
139
139
return fields_[kIndex ];
140
140
}
141
141
142
- inline bool Environment::TickInfo::last_threw () const {
143
- return last_threw_;
144
- }
145
-
146
142
inline uint32_t Environment::TickInfo::length () const {
147
143
return fields_[kLength ];
148
144
}
@@ -155,10 +151,6 @@ inline void Environment::TickInfo::set_index(uint32_t value) {
155
151
fields_[kIndex ] = value;
156
152
}
157
153
158
- inline void Environment::TickInfo::set_last_threw (bool value) {
159
- last_threw_ = value;
160
- }
161
-
162
154
inline Environment::ArrayBufferAllocatorInfo::ArrayBufferAllocatorInfo () {
163
155
for (int i = 0 ; i < kFieldsCount ; ++i)
164
156
fields_[i] = 0 ;
Original file line number Diff line number Diff line change @@ -81,12 +81,11 @@ bool Environment::KickNextTick(Environment::AsyncCallbackScope* scope) {
81
81
}
82
82
83
83
// process nextTicks after call
84
- TryCatch try_catch;
84
+ TryCatch try_catch ( isolate ()) ;
85
85
try_catch.SetVerbose (true );
86
86
tick_callback_function ()->Call (process_object (), 0 , nullptr );
87
87
88
88
if (try_catch.HasCaught ()) {
89
- info->set_last_threw (true );
90
89
return false ;
91
90
}
92
91
Original file line number Diff line number Diff line change @@ -345,12 +345,10 @@ class Environment {
345
345
inline uint32_t * fields ();
346
346
inline int fields_count () const ;
347
347
inline bool in_tick () const ;
348
- inline bool last_threw () const ;
349
348
inline uint32_t index () const ;
350
349
inline uint32_t length () const ;
351
350
inline void set_in_tick (bool value);
352
351
inline void set_index (uint32_t value);
353
- inline void set_last_threw (bool value);
354
352
355
353
private:
356
354
friend class Environment ; // So we can call the constructor.
@@ -364,7 +362,6 @@ class Environment {
364
362
365
363
uint32_t fields_[kFieldsCount ];
366
364
bool in_tick_;
367
- bool last_threw_;
368
365
369
366
DISALLOW_COPY_AND_ASSIGN (TickInfo);
370
367
};
Original file line number Diff line number Diff line change @@ -1127,10 +1127,10 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
1127
1127
1128
1128
1129
1129
Local<Value> MakeCallback (Environment* env,
1130
- Local<Value> recv,
1131
- const Local<Function> callback,
1132
- int argc,
1133
- Local<Value> argv[]) {
1130
+ Local<Value> recv,
1131
+ const Local<Function> callback,
1132
+ int argc,
1133
+ Local<Value> argv[]) {
1134
1134
// If you hit this assertion, you forgot to enter the v8::Context first.
1135
1135
CHECK_EQ (env->context (), env->isolate ()->GetCurrentContext ());
1136
1136
@@ -1162,7 +1162,7 @@ Local<Value> MakeCallback(Environment* env,
1162
1162
}
1163
1163
}
1164
1164
1165
- TryCatch try_catch;
1165
+ TryCatch try_catch (env-> isolate ()) ;
1166
1166
try_catch.SetVerbose (true );
1167
1167
1168
1168
if (has_domain) {
You can’t perform that action at this time.
0 commit comments