Skip to content

Commit e7a9671

Browse files
committed
style(runtime): clang-format
1 parent b3d6ccd commit e7a9671

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

‎NativeScript/runtime/Helpers.mm‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ throw NativeScriptException(
704704

705705
bool tns::ReportReleasedObject(Isolate* isolate, const Local<Value>& val, ReleasedReason reason,
706706
const char* operation, bool canThrow) {
707-
return ApplyReleasedObjectPolicy(isolate, val, ReleasedReasonMessage(reason), operation, canThrow);
707+
return ApplyReleasedObjectPolicy(isolate, val, ReleasedReasonMessage(reason), operation,
708+
canThrow);
708709
}
709710

710711
bool tns::WrapperLifetimeWarningsEnabled() {

‎NativeScript/runtime/NsBuiltinModules.cpp‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include "Helpers.h"
99
#include "Interop.h"
1010
#include "Messaging.h"
11-
#include "ObjectManager.h"
1211
#include "ModuleInternalCallbacks.h"
12+
#include "ObjectManager.h"
1313
#include "Runtime.h"
1414
#include "StructuredSerialization.h"
1515
#include "TextEncoding.h"
@@ -212,7 +212,8 @@ void GetWrapperLifetimeStatsCallback(const FunctionCallbackInfo<Value>& info) {
212212
Isolate* isolate = info.GetIsolate();
213213
Local<Context> context = isolate->GetCurrentContext();
214214
Local<Object> result = Object::New(isolate);
215-
tns::ObjectManager::LifetimeStats* stats = tns::ObjectManager::GetLifetimeStats(isolate);
215+
tns::ObjectManager::LifetimeStats* stats =
216+
tns::ObjectManager::GetLifetimeStats(isolate);
216217
if (stats == nullptr) {
217218
info.GetReturnValue().Set(result);
218219
return;
@@ -271,8 +272,9 @@ MaybeLocal<Object> NsRuntimeBinding(Local<Context> context) {
271272
.FromMaybe(false) ||
272273
!binding->Set(context, tns::ToV8String(isolate, "getConfig"), getConfig)
273274
.FromMaybe(false) ||
274-
!binding->Set(context, tns::ToV8String(isolate, "getWrapperLifetimeStats"),
275-
getWrapperLifetimeStats)
275+
!binding
276+
->Set(context, tns::ToV8String(isolate, "getWrapperLifetimeStats"),
277+
getWrapperLifetimeStats)
276278
.FromMaybe(false)) {
277279
return MaybeLocal<Object>();
278280
}

‎NativeScript/runtime/ObjectManager.mm‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#include "ObjectManager.h"
22
#include <Block.h>
33
#include <CoreFoundation/CoreFoundation.h>
4+
#include <objc/message.h>
5+
#include <objc/runtime.h>
46
#include <sstream>
7+
#include <string>
58
#include <unordered_map>
9+
#include <unordered_set>
610
#include <vector>
711
#include "Caches.h"
812
#include "ClassBuilder.h"
@@ -12,11 +16,6 @@
1216
#include "FFICall.h"
1317
#include "Helpers.h"
1418
#include "Runtime.h"
15-
#include <objc/message.h>
16-
#include <objc/runtime.h>
17-
#include <string>
18-
#include <unordered_set>
19-
#include <vector>
2019

2120
// Exported by libobjc; not declared in a public header for MRC code.
2221
extern "C" id objc_initWeak(id* location, id value);
@@ -754,9 +753,9 @@ void DisposeHandle(v8::Isolate* isolate,
754753
if (tns::GetValue(isolate, obj) == wrapper) {
755754
delete wrapper;
756755
if (type == WrapperType::ObjCObject) {
757-
tns::MarkReleased(isolate, obj,
758-
isFinalDisposal ? tns::ReleasedReason::kTeardown
759-
: tns::ReleasedReason::kCollected);
756+
tns::MarkReleased(
757+
isolate, obj,
758+
isFinalDisposal ? tns::ReleasedReason::kTeardown : tns::ReleasedReason::kCollected);
760759
} else {
761760
tns::DeleteValue(isolate, obj);
762761
}

0 commit comments

Comments
 (0)