@@ -170,7 +170,7 @@ namespace Js
170
170
// to share the common APIs without requiring everyone to access EngineInterfaceObject.Common.
171
171
this ->commonNativeInterfaces = DynamicObject::New (recycler,
172
172
DynamicType::New (scriptContext, TypeIds_Object, library->GetObjectPrototype (), nullptr ,
173
- DeferredTypeHandler<InitializeCommonNativeInterfaces>::GetDefaultInstance ()));
173
+ DeferredTypeHandler<InitializeCommonNativeInterfaces>::GetDefaultInstance ()));
174
174
library->AddMember (this , Js::PropertyIds::Common, this ->commonNativeInterfaces );
175
175
176
176
for (uint i = 0 ; i <= MaxEngineInterfaceExtensionKind; i++)
@@ -210,15 +210,9 @@ namespace Js
210
210
211
211
JavascriptLibrary* library = commonNativeInterfaces->GetScriptContext ()->GetLibrary ();
212
212
213
- #ifndef GlobalBuiltIn
214
- #define GlobalBuiltIn (global, method ) \
215
- library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::builtIn##global##method, &EngineInterfaceObject::EntryInfo::BuiltIn_##global##_##method##, 1 ); \
216
-
213
+ #define GlobalBuiltIn (global, method ) library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::builtIn##global##method, &EngineInterfaceObject::EntryInfo::BuiltIn_##global##_##method##, 1 );
217
214
#define GlobalBuiltInConstructor (global ) SetPropertyOn(commonNativeInterfaces, Js::PropertyIds::##global##, library->Get##global##Constructor());
218
-
219
- #define BuiltInRaiseException (exceptionType, exceptionID ) \
220
- library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::raise ##exceptionID, &EngineInterfaceObject::EntryInfo::BuiltIn_raise##exceptionID, 1 ); \
221
-
215
+ #define BuiltInRaiseException (exceptionType, exceptionID ) library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::raise##exceptionID, &EngineInterfaceObject::EntryInfo::BuiltIn_raise##exceptionID, 1 );
222
216
#define BuiltInRaiseException1 (exceptionType, exceptionID ) BuiltInRaiseException(exceptionType, exceptionID)
223
217
#define BuiltInRaiseException2 (exceptionType, exceptionID ) BuiltInRaiseException(exceptionType, exceptionID)
224
218
#define BuiltInRaiseException3 (exceptionType, exceptionID ) BuiltInRaiseException(exceptionType, exceptionID##_3)
@@ -231,7 +225,7 @@ namespace Js
231
225
#undef BuiltInRaiseException3
232
226
#undef GlobalBuiltIn
233
227
#undef GlobalBuiltInConstructor
234
- # endif
228
+
235
229
library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::builtInJavascriptObjectCreate, &JavascriptObject::EntryInfo::Create, 1 );
236
230
library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::builtInJavascriptObjectPreventExtensions, &JavascriptObject::EntryInfo::PreventExtensions, 1 );
237
231
library->AddFunctionToLibraryObject (commonNativeInterfaces, Js::PropertyIds::builtInJavascriptObjectGetOwnPropertyDescriptor, &JavascriptObject::EntryInfo::GetOwnPropertyDescriptor, 1 );
@@ -266,7 +260,7 @@ namespace Js
266
260
int hr = Js::JavascriptConversion::ToInt32 (args[1 ], scriptContext);
267
261
int resourceId;
268
262
269
- switch (hr)
263
+ switch (hr)
270
264
{
271
265
case ASYNCERR_NoErrorInErrorState:
272
266
resourceId = 5200 ;
@@ -285,7 +279,7 @@ namespace Js
285
279
const int strLength = 1024 ;
286
280
OLECHAR errorString[strLength];
287
281
288
- if (FGetResourceString (resourceId, errorString, strLength))
282
+ if (FGetResourceString (resourceId, errorString, strLength))
289
283
{
290
284
return Js::JavascriptString::NewCopySz (errorString, scriptContext);
291
285
}
@@ -440,7 +434,7 @@ namespace Js
440
434
Var newVars[3 ];
441
435
Js::Arguments newArgs (callInfo, newVars);
442
436
443
- for (uint i = 0 ; i< args.Info .Count - 2 ; ++i)
437
+ for (uint i = 0 ; i < args.Info .Count - 2 ; ++i)
444
438
{
445
439
newArgs.Values [i] = args.Values [i + 2 ];
446
440
}
0 commit comments