File tree 5 files changed +9
-22
lines changed
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 @@ -74,12 +74,11 @@ bool Environment::KickNextTick(Environment::AsyncCallbackScope* scope) {
74
74
}
75
75
76
76
// process nextTicks after call
77
- TryCatch try_catch;
77
+ TryCatch try_catch ( isolate ()) ;
78
78
try_catch.SetVerbose (true );
79
79
tick_callback_function ()->Call (process_object (), 0 , nullptr );
80
80
81
81
if (try_catch.HasCaught ()) {
82
- info->set_last_threw (true );
83
82
return false ;
84
83
}
85
84
Original file line number Diff line number Diff line change @@ -332,12 +332,10 @@ class Environment {
332
332
inline uint32_t * fields ();
333
333
inline int fields_count () const ;
334
334
inline bool in_tick () const ;
335
- inline bool last_threw () const ;
336
335
inline uint32_t index () const ;
337
336
inline uint32_t length () const ;
338
337
inline void set_in_tick (bool value);
339
338
inline void set_index (uint32_t value);
340
- inline void set_last_threw (bool value);
341
339
342
340
private:
343
341
friend class Environment ; // So we can call the constructor.
@@ -351,7 +349,6 @@ class Environment {
351
349
352
350
uint32_t fields_[kFieldsCount ];
353
351
bool in_tick_;
354
- bool last_threw_;
355
352
356
353
DISALLOW_COPY_AND_ASSIGN (TickInfo);
357
354
};
Original file line number Diff line number Diff line change @@ -1119,10 +1119,10 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
1119
1119
1120
1120
1121
1121
Local<Value> MakeCallback (Environment* env,
1122
- Local<Value> recv,
1123
- const Local<Function> callback,
1124
- int argc,
1125
- Local<Value> argv[]) {
1122
+ Local<Value> recv,
1123
+ const Local<Function> callback,
1124
+ int argc,
1125
+ Local<Value> argv[]) {
1126
1126
// If you hit this assertion, you forgot to enter the v8::Context first.
1127
1127
CHECK_EQ (env->context (), env->isolate ()->GetCurrentContext ());
1128
1128
@@ -1154,7 +1154,7 @@ Local<Value> MakeCallback(Environment* env,
1154
1154
}
1155
1155
}
1156
1156
1157
- TryCatch try_catch;
1157
+ TryCatch try_catch (env-> isolate ()) ;
1158
1158
try_catch.SetVerbose (true );
1159
1159
1160
1160
if (has_domain) {
You can’t perform that action at this time.
0 commit comments