@@ -35,21 +35,33 @@ namespace v8 {
3535 return Local<Resolver>();
3636 }
3737
38- if (jsrt::SetProperty (resolver, jsrt::CachedPropertyIdRef::promise, promise) != JsNoError) {
38+ if (jsrt::SetProperty (
39+ resolver,
40+ jsrt::CachedPropertyIdRef::promise,
41+ promise) != JsNoError) {
3942 return Local<Resolver>();
4043 }
4144
42- if (jsrt::SetProperty (resolver, jsrt::CachedPropertyIdRef::resolve, resolve) != JsNoError) {
45+ if (jsrt::SetProperty (
46+ resolver,
47+ jsrt::CachedPropertyIdRef::resolve,
48+ resolve) != JsNoError) {
4349 return Local<Resolver>();
4450 }
4551
46- if (jsrt::SetProperty (resolver, jsrt::CachedPropertyIdRef::reject, reject) != JsNoError) {
52+ if (jsrt::SetProperty (
53+ resolver,
54+ jsrt::CachedPropertyIdRef::reject,
55+ reject) != JsNoError) {
4756 return Local<Resolver>();
4857 }
4958
5059 JsValueRef state;
5160 jsrt::UintToValue (0 , &state);
52- if (jsrt::SetProperty (promise, jsrt::CachedPropertyIdRef::value, state) != JsNoError) {
61+ if (jsrt::SetProperty (
62+ promise,
63+ jsrt::CachedPropertyIdRef::value,
64+ state) != JsNoError) {
5365 return Local<Resolver>();
5466 }
5567
@@ -62,7 +74,10 @@ namespace v8 {
6274
6375 Local<Promise> Resolver::GetPromise () {
6476 JsValueRef promise;
65- if (jsrt::GetProperty (this , jsrt::CachedPropertyIdRef::promise, &promise) != JsNoError) {
77+ if (jsrt::GetProperty (
78+ this ,
79+ jsrt::CachedPropertyIdRef::promise,
80+ &promise) != JsNoError) {
6681 return Local<Promise>();
6782 }
6883 return Local<Promise>::New (static_cast <Promise*>(promise));
@@ -74,28 +89,40 @@ namespace v8 {
7489
7590 Maybe<bool > Resolver::Resolve (Local<Context> context, Local<Value> value) {
7691 JsValueRef resolve;
77- if (jsrt::GetProperty (this , jsrt::CachedPropertyIdRef::resolve, &resolve) != JsNoError) {
92+ if (jsrt::GetProperty (
93+ this ,
94+ jsrt::CachedPropertyIdRef::resolve,
95+ &resolve) != JsNoError) {
7896 return Nothing<bool >();
7997 }
8098
8199 JsValueRef promise;
82- if (jsrt::GetProperty (this , jsrt::CachedPropertyIdRef::promise, &promise) != JsNoError) {
100+ if (jsrt::GetProperty (
101+ this ,
102+ jsrt::CachedPropertyIdRef::promise,
103+ &promise) != JsNoError) {
83104 return Nothing<bool >();
84105 }
85106
86- if (jsrt::SetProperty (promise, jsrt::CachedPropertyIdRef::value, *value) != JsNoError) {
107+ if (jsrt::SetProperty (
108+ promise,
109+ jsrt::CachedPropertyIdRef::value,
110+ *value) != JsNoError) {
87111 return Nothing<bool >();
88112 }
89113
90114 JsValueRef state;
91115 jsrt::UintToValue (1 , &state);
92- if (jsrt::SetProperty (promise, jsrt::CachedPropertyIdRef::value, state) != JsNoError) {
116+ if (jsrt::SetProperty (
117+ promise,
118+ jsrt::CachedPropertyIdRef::value,
119+ state) != JsNoError) {
93120 return Nothing<bool >();
94121 }
95-
122+
96123 JsValueRef result;
97124 JsValueRef args[2 ];
98- args[0 ] = this ; // ? What is the "this" of the resolver here?
125+ args[0 ] = this ; // ? What is the "this" of the resolver here?
99126 args[1 ] = reinterpret_cast <JsValueRef>(*value);
100127
101128 if (JsCallFunction (resolve, args, 2 , &result) != JsNoError) {
@@ -112,28 +139,40 @@ namespace v8 {
112139
113140 Maybe<bool > Resolver::Reject (Local<Context> context, Local<Value> value) {
114141 JsValueRef reject;
115- if (jsrt::GetProperty (this , jsrt::CachedPropertyIdRef::reject, &reject) != JsNoError) {
142+ if (jsrt::GetProperty (
143+ this ,
144+ jsrt::CachedPropertyIdRef::reject,
145+ &reject) != JsNoError) {
116146 return Nothing<bool >();
117147 }
118148
119149 JsValueRef promise;
120- if (jsrt::GetProperty (this , jsrt::CachedPropertyIdRef::promise, &promise) != JsNoError) {
150+ if (jsrt::GetProperty (
151+ this ,
152+ jsrt::CachedPropertyIdRef::promise,
153+ &promise) != JsNoError) {
121154 return Nothing<bool >();
122155 }
123156
124- if (jsrt::SetProperty (promise, jsrt::CachedPropertyIdRef::value, *value) != JsNoError) {
157+ if (jsrt::SetProperty (
158+ promise,
159+ jsrt::CachedPropertyIdRef::value,
160+ *value) != JsNoError) {
125161 return Nothing<bool >();
126162 }
127163
128164 JsValueRef state;
129165 jsrt::UintToValue (2 , &state);
130- if (jsrt::SetProperty (promise, jsrt::CachedPropertyIdRef::value, state) != JsNoError) {
166+ if (jsrt::SetProperty (
167+ promise,
168+ jsrt::CachedPropertyIdRef::value,
169+ state) != JsNoError) {
131170 return Nothing<bool >();
132171 }
133-
172+
134173 JsValueRef result;
135174 JsValueRef args[2 ];
136- args[0 ] = this ; // ? What is the "this" of the resolver here?
175+ args[0 ] = this ; // ? What is the "this" of the resolver here?
137176 args[1 ] = reinterpret_cast <JsValueRef>(*value);
138177
139178 if (JsCallFunction (reject, args, 2 , &result) != JsNoError) {
0 commit comments