@triniwiz/nativescript-masonkit 1.0.0-alpha.5 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.d.ts +7 -9
- package/common.js +277 -552
- package/common.js.map +1 -1
- package/helpers.d.ts +32 -10
- package/helpers.js +772 -286
- package/helpers.js.map +1 -1
- package/index.android.d.ts +6 -2
- package/index.android.js +21 -3
- package/index.android.js.map +1 -1
- package/index.d.ts +64 -7
- package/index.ios.d.ts +9 -6
- package/index.ios.js +39 -25
- package/index.ios.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/include.gradle +18 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/build.xcconfig +1 -2
- package/platforms/ios/src/MasonV8Module.h +583 -0
- package/platforms/ios/src/MasonV8Module.mm +1005 -0
- package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/module.modulemap +2 -2
- package/platforms/new_native_src/cpp/Caches.cpp +36 -0
- package/platforms/new_native_src/cpp/Caches.h +42 -0
- package/platforms/new_native_src/cpp/Common.h +34 -0
- package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
- package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
- package/platforms/new_native_src/cpp/Helpers.h +364 -0
- package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
- package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
- package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
- package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
- package/pods/Headers/include/APIDesign.md +72 -0
- package/pods/Headers/include/DEPS +10 -0
- package/pods/Headers/include/DIR_METADATA +11 -0
- package/pods/Headers/include/OWNERS +23 -0
- package/pods/Headers/include/cppgc/DEPS +8 -0
- package/pods/Headers/include/cppgc/OWNERS +2 -0
- package/pods/Headers/include/cppgc/README.md +133 -0
- package/pods/Headers/include/cppgc/allocation.h +310 -0
- package/pods/Headers/include/cppgc/common.h +29 -0
- package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/pods/Headers/include/cppgc/custom-space.h +97 -0
- package/pods/Headers/include/cppgc/default-platform.h +67 -0
- package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/pods/Headers/include/cppgc/explicit-management.h +100 -0
- package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
- package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
- package/pods/Headers/include/cppgc/heap-state.h +82 -0
- package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
- package/pods/Headers/include/cppgc/heap.h +206 -0
- package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/pods/Headers/include/cppgc/internal/logging.h +50 -0
- package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
- package/pods/Headers/include/cppgc/macros.h +26 -0
- package/pods/Headers/include/cppgc/member.h +291 -0
- package/pods/Headers/include/cppgc/name-provider.h +65 -0
- package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
- package/pods/Headers/include/cppgc/persistent.h +370 -0
- package/pods/Headers/include/cppgc/platform.h +156 -0
- package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
- package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/pods/Headers/include/cppgc/source-location.h +92 -0
- package/pods/Headers/include/cppgc/testing.h +106 -0
- package/pods/Headers/include/cppgc/trace-trait.h +116 -0
- package/pods/Headers/include/cppgc/type-traits.h +240 -0
- package/pods/Headers/include/cppgc/visitor.h +379 -0
- package/pods/Headers/include/js_protocol-1.2.json +936 -0
- package/pods/Headers/include/js_protocol-1.3.json +1112 -0
- package/pods/Headers/include/js_protocol.pdl +1709 -0
- package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
- package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/pods/Headers/include/libffi.h +12 -0
- package/pods/Headers/include/libplatform/DEPS +9 -0
- package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
- package/pods/Headers/include/libplatform/libplatform.h +106 -0
- package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
- package/pods/Headers/include/v8-array-buffer.h +433 -0
- package/pods/Headers/include/v8-callbacks.h +397 -0
- package/pods/Headers/include/v8-container.h +129 -0
- package/pods/Headers/include/v8-context.h +407 -0
- package/pods/Headers/include/v8-cppgc.h +215 -0
- package/pods/Headers/include/v8-data.h +80 -0
- package/pods/Headers/include/v8-date.h +43 -0
- package/pods/Headers/include/v8-debug.h +168 -0
- package/pods/Headers/include/v8-embedder-heap.h +218 -0
- package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
- package/pods/Headers/include/v8-exception.h +217 -0
- package/pods/Headers/include/v8-extension.h +62 -0
- package/pods/Headers/include/v8-external.h +37 -0
- package/pods/Headers/include/v8-fast-api-calls.h +939 -0
- package/pods/Headers/include/v8-forward.h +81 -0
- package/pods/Headers/include/v8-function-callback.h +475 -0
- package/pods/Headers/include/v8-function.h +125 -0
- package/pods/Headers/include/v8-initialization.h +315 -0
- package/pods/Headers/include/v8-inspector-protocol.h +13 -0
- package/pods/Headers/include/v8-inspector.h +376 -0
- package/pods/Headers/include/v8-internal.h +661 -0
- package/pods/Headers/include/v8-isolate.h +1709 -0
- package/pods/Headers/include/v8-json.h +47 -0
- package/pods/Headers/include/v8-local-handle.h +455 -0
- package/pods/Headers/include/v8-locker.h +149 -0
- package/pods/Headers/include/v8-maybe.h +137 -0
- package/pods/Headers/include/v8-memory-span.h +43 -0
- package/pods/Headers/include/v8-message.h +216 -0
- package/pods/Headers/include/v8-metrics.h +255 -0
- package/pods/Headers/include/v8-microtask-queue.h +152 -0
- package/pods/Headers/include/v8-microtask.h +28 -0
- package/pods/Headers/include/v8-object.h +775 -0
- package/pods/Headers/include/v8-persistent-handle.h +590 -0
- package/pods/Headers/include/v8-platform.h +1092 -0
- package/pods/Headers/include/v8-primitive-object.h +118 -0
- package/pods/Headers/include/v8-primitive.h +866 -0
- package/pods/Headers/include/v8-profiler.h +1198 -0
- package/pods/Headers/include/v8-promise.h +174 -0
- package/pods/Headers/include/v8-proxy.h +50 -0
- package/pods/Headers/include/v8-regexp.h +105 -0
- package/pods/Headers/include/v8-script.h +748 -0
- package/pods/Headers/include/v8-snapshot.h +196 -0
- package/pods/Headers/include/v8-statistics.h +217 -0
- package/pods/Headers/include/v8-template.h +1079 -0
- package/pods/Headers/include/v8-traced-handle.h +420 -0
- package/pods/Headers/include/v8-typed-array.h +282 -0
- package/pods/Headers/include/v8-unwinder-state.h +31 -0
- package/pods/Headers/include/v8-unwinder.h +132 -0
- package/pods/Headers/include/v8-util.h +658 -0
- package/pods/Headers/include/v8-value-serializer-version.h +24 -0
- package/pods/Headers/include/v8-value-serializer.h +279 -0
- package/pods/Headers/include/v8-value.h +526 -0
- package/pods/Headers/include/v8-version-string.h +38 -0
- package/pods/Headers/include/v8-version.h +20 -0
- package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/pods/Headers/include/v8-wasm.h +257 -0
- package/pods/Headers/include/v8-weak-callback-info.h +86 -0
- package/pods/Headers/include/v8.h +88 -0
- package/pods/Headers/include/v8config.h +605 -0
- package/pods/Headers/inspector/InspectorServer.h +20 -0
- package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/pods/Headers/inspector/base64.h +9 -0
- package/pods/Headers/inspector/src/base/address-region.h +95 -0
- package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/pods/Headers/inspector/src/base/atomicops.h +332 -0
- package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/pods/Headers/inspector/src/base/base-export.h +31 -0
- package/pods/Headers/inspector/src/base/bits.h +343 -0
- package/pods/Headers/inspector/src/base/build_config.h +234 -0
- package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/pods/Headers/inspector/src/base/export-template.h +163 -0
- package/pods/Headers/inspector/src/base/flags.h +130 -0
- package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/pods/Headers/inspector/src/base/logging.h +417 -0
- package/pods/Headers/inspector/src/base/macros.h +423 -0
- package/pods/Headers/inspector/src/base/memory.h +89 -0
- package/pods/Headers/inspector/src/base/once.h +108 -0
- package/pods/Headers/inspector/src/base/optional.h +882 -0
- package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
- package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/pods/Headers/inspector/src/base/template-utils.h +113 -0
- package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/pods/Headers/inspector/src/common/checks.h +38 -0
- package/pods/Headers/inspector/src/common/globals.h +1842 -0
- package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
- package/pods/Headers/inspector/src/init/v8.h +52 -0
- package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
- package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
- package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
- package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
- package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/pods/Headers/inspector/src/utils/allocation.h +367 -0
- package/pods/Headers/inspector/src/utils/vector.h +324 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/pods/Headers/inspector/utils.h +32 -0
- package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
- package/pods/Headers/jsi/decorator.h +762 -0
- package/pods/Headers/jsi/instrumentation.h +117 -0
- package/pods/Headers/jsi/jsi-inl.h +322 -0
- package/pods/Headers/jsi/jsi.h +1387 -0
- package/pods/Headers/jsi/jsilib.h +59 -0
- package/pods/Headers/jsi/threadsafe.h +79 -0
- package/pods/Headers/runtime/ArgConverter.h +61 -0
- package/pods/Headers/runtime/ArrayAdapter.h +13 -0
- package/pods/Headers/runtime/Caches.h +98 -0
- package/pods/Headers/runtime/ClassBuilder.h +61 -0
- package/pods/Headers/runtime/Common.h +9 -0
- package/pods/Headers/runtime/ConcurrentMap.h +55 -0
- package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
- package/pods/Headers/runtime/Console.h +27 -0
- package/pods/Headers/runtime/Constants.h +15 -0
- package/pods/Headers/runtime/DataWrapper.h +671 -0
- package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
- package/pods/Headers/runtime/ExtVector.h +21 -0
- package/pods/Headers/runtime/FFICall.h +105 -0
- package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/pods/Headers/runtime/FunctionReference.h +18 -0
- package/pods/Headers/runtime/Helpers.h +84 -0
- package/pods/Headers/runtime/InlineFunctions.h +16 -0
- package/pods/Headers/runtime/Interop.h +202 -0
- package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/pods/Headers/runtime/Metadata.h +981 -0
- package/pods/Headers/runtime/MetadataBuilder.h +72 -0
- package/pods/Headers/runtime/MetadataInlines.h +157 -0
- package/pods/Headers/runtime/ModuleInternal.h +59 -0
- package/pods/Headers/runtime/NSDataAdapter.h +13 -0
- package/pods/Headers/runtime/NativeScriptException.h +27 -0
- package/pods/Headers/runtime/ObjectManager.h +31 -0
- package/pods/Headers/runtime/OneByteStringResource.h +21 -0
- package/pods/Headers/runtime/Pointer.h +26 -0
- package/pods/Headers/runtime/PromiseProxy.h +15 -0
- package/pods/Headers/runtime/Reference.h +38 -0
- package/pods/Headers/runtime/Runtime.h +67 -0
- package/pods/Headers/runtime/RuntimeConfig.h +17 -0
- package/pods/Headers/runtime/SetTimeout.h +34 -0
- package/pods/Headers/runtime/SimpleAllocator.h +23 -0
- package/pods/Headers/runtime/StringHasher.h +315 -0
- package/pods/Headers/runtime/SymbolIterator.h +18 -0
- package/pods/Headers/runtime/SymbolLoader.h +27 -0
- package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
- package/pods/Headers/runtime/TSHelpers.h +15 -0
- package/pods/Headers/runtime/Tasks.h +19 -0
- package/pods/Headers/runtime/UnmanagedType.h +21 -0
- package/pods/Headers/runtime/WeakRef.h +15 -0
- package/pods/Headers/runtime/Worker.h +26 -0
- package/pods/Headers/runtime/robin_hood.h +2184 -0
- package/pods/Headers/v8runtime/HostProxy.h +71 -0
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
- package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
- package/pods/Headers/v8runtime/V8Runtime.h +215 -0
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
- package/pods/NativeScript.podspec +68 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/src/JSIModule.h +0 -217
- package/platforms/ios/src/JSIModule.mm +0 -2788
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef V8_DEBUG_DEBUG_INTERFACE_H_
|
|
6
|
+
#define V8_DEBUG_DEBUG_INTERFACE_H_
|
|
7
|
+
|
|
8
|
+
#include <memory>
|
|
9
|
+
|
|
10
|
+
#include "include/v8-util.h"
|
|
11
|
+
#include "include/v8.h"
|
|
12
|
+
#include "src/base/platform/v8-time.h"
|
|
13
|
+
#include "src/common/globals.h"
|
|
14
|
+
#include "src/debug/interface-types.h"
|
|
15
|
+
#include "src/utils/vector.h"
|
|
16
|
+
|
|
17
|
+
namespace v8_inspector {
|
|
18
|
+
class V8Inspector;
|
|
19
|
+
} // namespace v8_inspector
|
|
20
|
+
|
|
21
|
+
namespace v8 {
|
|
22
|
+
|
|
23
|
+
namespace internal {
|
|
24
|
+
struct CoverageBlock;
|
|
25
|
+
struct CoverageFunction;
|
|
26
|
+
struct CoverageScript;
|
|
27
|
+
struct TypeProfileEntry;
|
|
28
|
+
struct TypeProfileScript;
|
|
29
|
+
class Coverage;
|
|
30
|
+
class DisableBreak;
|
|
31
|
+
class PostponeInterruptsScope;
|
|
32
|
+
class Script;
|
|
33
|
+
class TypeProfile;
|
|
34
|
+
} // namespace internal
|
|
35
|
+
|
|
36
|
+
namespace debug {
|
|
37
|
+
|
|
38
|
+
void SetContextId(Local<Context> context, int id);
|
|
39
|
+
int GetContextId(Local<Context> context);
|
|
40
|
+
|
|
41
|
+
void SetInspector(Isolate* isolate, v8_inspector::V8Inspector*);
|
|
42
|
+
v8_inspector::V8Inspector* GetInspector(Isolate* isolate);
|
|
43
|
+
|
|
44
|
+
// Returns the debug name for the function, which is supposed to be used
|
|
45
|
+
// by the debugger and the developer tools. This can thus be different from
|
|
46
|
+
// the name returned by the StackFrame::GetFunctionName() method. For example,
|
|
47
|
+
// in case of WebAssembly, the debug name is WAT-compatible and thus always
|
|
48
|
+
// preceeded by a dollar ('$').
|
|
49
|
+
Local<String> GetFunctionDebugName(Local<StackFrame> frame);
|
|
50
|
+
|
|
51
|
+
// Returns a debug string representation of the function.
|
|
52
|
+
Local<String> GetFunctionDescription(Local<Function> function);
|
|
53
|
+
|
|
54
|
+
// Schedule a debugger break to happen when function is called inside given
|
|
55
|
+
// isolate.
|
|
56
|
+
V8_EXPORT_PRIVATE void SetBreakOnNextFunctionCall(Isolate* isolate);
|
|
57
|
+
|
|
58
|
+
// Remove scheduled debugger break in given isolate if it has not
|
|
59
|
+
// happened yet.
|
|
60
|
+
V8_EXPORT_PRIVATE void ClearBreakOnNextFunctionCall(Isolate* isolate);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Returns array of internal properties specific to the value type. Result has
|
|
64
|
+
* the following format: [<name>, <value>,...,<name>, <value>]. Result array
|
|
65
|
+
* will be allocated in the current context.
|
|
66
|
+
*/
|
|
67
|
+
MaybeLocal<Array> GetInternalProperties(Isolate* isolate, Local<Value> value);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Returns through the out parameters names_out a vector of names
|
|
71
|
+
* in v8::String for private members, including fields, methods,
|
|
72
|
+
* accessors specific to the value type.
|
|
73
|
+
* The values are returned through the out parameter values_out in the
|
|
74
|
+
* corresponding indices. Private fields and methods are returned directly
|
|
75
|
+
* while accessors are returned as v8::debug::AccessorPair. Missing components
|
|
76
|
+
* in the accessor pairs are null.
|
|
77
|
+
* If an exception occurs, false is returned. Otherwise true is returned.
|
|
78
|
+
* Results will be allocated in the current context and handle scope.
|
|
79
|
+
*/
|
|
80
|
+
V8_EXPORT_PRIVATE bool GetPrivateMembers(Local<Context> context,
|
|
81
|
+
Local<Object> value,
|
|
82
|
+
std::vector<Local<Value>>* names_out,
|
|
83
|
+
std::vector<Local<Value>>* values_out);
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Forwards to v8::Object::CreationContext, but with special handling for
|
|
87
|
+
* JSGlobalProxy objects.
|
|
88
|
+
*/
|
|
89
|
+
MaybeLocal<Context> GetCreationContext(Local<Object> value);
|
|
90
|
+
|
|
91
|
+
enum ExceptionBreakState {
|
|
92
|
+
NoBreakOnException = 0,
|
|
93
|
+
BreakOnUncaughtException = 1,
|
|
94
|
+
BreakOnAnyException = 2
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Defines if VM will pause on exceptions or not.
|
|
99
|
+
* If BreakOnAnyExceptions is set then VM will pause on caught and uncaught
|
|
100
|
+
* exception, if BreakOnUncaughtException is set then VM will pause only on
|
|
101
|
+
* uncaught exception, otherwise VM won't stop on any exception.
|
|
102
|
+
*/
|
|
103
|
+
void ChangeBreakOnException(Isolate* isolate, ExceptionBreakState state);
|
|
104
|
+
|
|
105
|
+
void RemoveBreakpoint(Isolate* isolate, BreakpointId id);
|
|
106
|
+
void SetBreakPointsActive(Isolate* isolate, bool is_active);
|
|
107
|
+
|
|
108
|
+
enum StepAction {
|
|
109
|
+
StepOut = 0, // Step out of the current function.
|
|
110
|
+
StepNext = 1, // Step to the next statement in the current function.
|
|
111
|
+
StepIn = 2 // Step into new functions invoked or the next statement
|
|
112
|
+
// in the current function.
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
void PrepareStep(Isolate* isolate, StepAction action);
|
|
116
|
+
void ClearStepping(Isolate* isolate);
|
|
117
|
+
V8_EXPORT_PRIVATE void BreakRightNow(Isolate* isolate);
|
|
118
|
+
|
|
119
|
+
// Use `SetTerminateOnResume` to indicate that an TerminateExecution interrupt
|
|
120
|
+
// should be set shortly before resuming, i.e. shortly before returning into
|
|
121
|
+
// the JavaScript stack frames on the stack. In contrast to setting the
|
|
122
|
+
// interrupt with `RequestTerminateExecution` directly, this flag allows
|
|
123
|
+
// the isolate to be entered for further JavaScript execution.
|
|
124
|
+
V8_EXPORT_PRIVATE void SetTerminateOnResume(Isolate* isolate);
|
|
125
|
+
|
|
126
|
+
bool CanBreakProgram(Isolate* isolate);
|
|
127
|
+
|
|
128
|
+
class Script;
|
|
129
|
+
|
|
130
|
+
struct LiveEditResult {
|
|
131
|
+
enum Status {
|
|
132
|
+
OK,
|
|
133
|
+
COMPILE_ERROR,
|
|
134
|
+
BLOCKED_BY_RUNNING_GENERATOR,
|
|
135
|
+
BLOCKED_BY_ACTIVE_FUNCTION
|
|
136
|
+
};
|
|
137
|
+
Status status = OK;
|
|
138
|
+
bool stack_changed = false;
|
|
139
|
+
// Available only for OK.
|
|
140
|
+
v8::Local<v8::debug::Script> script;
|
|
141
|
+
// Fields below are available only for COMPILE_ERROR.
|
|
142
|
+
v8::Local<v8::String> message;
|
|
143
|
+
int line_number = -1;
|
|
144
|
+
int column_number = -1;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Native wrapper around v8::internal::Script object.
|
|
149
|
+
*/
|
|
150
|
+
class V8_EXPORT_PRIVATE Script {
|
|
151
|
+
public:
|
|
152
|
+
v8::Isolate* GetIsolate() const;
|
|
153
|
+
|
|
154
|
+
ScriptOriginOptions OriginOptions() const;
|
|
155
|
+
bool WasCompiled() const;
|
|
156
|
+
bool IsEmbedded() const;
|
|
157
|
+
int Id() const;
|
|
158
|
+
int LineOffset() const;
|
|
159
|
+
int ColumnOffset() const;
|
|
160
|
+
std::vector<int> LineEnds() const;
|
|
161
|
+
MaybeLocal<String> Name() const;
|
|
162
|
+
MaybeLocal<String> SourceURL() const;
|
|
163
|
+
MaybeLocal<String> SourceMappingURL() const;
|
|
164
|
+
Maybe<int> ContextId() const;
|
|
165
|
+
MaybeLocal<String> Source() const;
|
|
166
|
+
bool IsModule() const;
|
|
167
|
+
bool GetPossibleBreakpoints(
|
|
168
|
+
const debug::Location& start, const debug::Location& end,
|
|
169
|
+
bool restrict_to_function,
|
|
170
|
+
std::vector<debug::BreakLocation>* locations) const;
|
|
171
|
+
int GetSourceOffset(const debug::Location& location) const;
|
|
172
|
+
v8::debug::Location GetSourceLocation(int offset) const;
|
|
173
|
+
bool SetScriptSource(v8::Local<v8::String> newSource, bool preview,
|
|
174
|
+
LiveEditResult* result) const;
|
|
175
|
+
bool SetBreakpoint(v8::Local<v8::String> condition, debug::Location* location,
|
|
176
|
+
BreakpointId* id) const;
|
|
177
|
+
#if V8_ENABLE_WEBASSEMBLY
|
|
178
|
+
bool IsWasm() const;
|
|
179
|
+
void RemoveWasmBreakpoint(BreakpointId id);
|
|
180
|
+
#endif // V8_ENABLE_WEBASSEMBLY
|
|
181
|
+
bool SetBreakpointOnScriptEntry(BreakpointId* id) const;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
#if V8_ENABLE_WEBASSEMBLY
|
|
185
|
+
// Specialization for wasm Scripts.
|
|
186
|
+
class WasmScript : public Script {
|
|
187
|
+
public:
|
|
188
|
+
static WasmScript* Cast(Script* script);
|
|
189
|
+
|
|
190
|
+
enum class DebugSymbolsType { None, SourceMap, EmbeddedDWARF, ExternalDWARF };
|
|
191
|
+
DebugSymbolsType GetDebugSymbolType() const;
|
|
192
|
+
MemorySpan<const char> ExternalSymbolsURL() const;
|
|
193
|
+
int NumFunctions() const;
|
|
194
|
+
int NumImportedFunctions() const;
|
|
195
|
+
MemorySpan<const uint8_t> Bytecode() const;
|
|
196
|
+
|
|
197
|
+
std::pair<int, int> GetFunctionRange(int function_index) const;
|
|
198
|
+
int GetContainingFunction(int byte_offset) const;
|
|
199
|
+
|
|
200
|
+
uint32_t GetFunctionHash(int function_index);
|
|
201
|
+
|
|
202
|
+
int CodeOffset() const;
|
|
203
|
+
int CodeLength() const;
|
|
204
|
+
};
|
|
205
|
+
#endif // V8_ENABLE_WEBASSEMBLY
|
|
206
|
+
|
|
207
|
+
V8_EXPORT_PRIVATE void GetLoadedScripts(Isolate* isolate,
|
|
208
|
+
PersistentValueVector<Script>& scripts);
|
|
209
|
+
|
|
210
|
+
MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
|
|
211
|
+
Local<String> source);
|
|
212
|
+
|
|
213
|
+
enum ExceptionType { kException, kPromiseRejection };
|
|
214
|
+
|
|
215
|
+
class DebugDelegate {
|
|
216
|
+
public:
|
|
217
|
+
virtual ~DebugDelegate() = default;
|
|
218
|
+
virtual void ScriptCompiled(v8::Local<Script> script, bool is_live_edited,
|
|
219
|
+
bool has_compile_error) {}
|
|
220
|
+
// |inspector_break_points_hit| contains id of breakpoints installed with
|
|
221
|
+
// debug::Script::SetBreakpoint API.
|
|
222
|
+
virtual void BreakProgramRequested(
|
|
223
|
+
v8::Local<v8::Context> paused_context,
|
|
224
|
+
const std::vector<debug::BreakpointId>& inspector_break_points_hit) {}
|
|
225
|
+
virtual void ExceptionThrown(v8::Local<v8::Context> paused_context,
|
|
226
|
+
v8::Local<v8::Value> exception,
|
|
227
|
+
v8::Local<v8::Value> promise, bool is_uncaught,
|
|
228
|
+
ExceptionType exception_type) {}
|
|
229
|
+
virtual bool IsFunctionBlackboxed(v8::Local<debug::Script> script,
|
|
230
|
+
const debug::Location& start,
|
|
231
|
+
const debug::Location& end) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
virtual bool ShouldBeSkipped(v8::Local<v8::debug::Script> script, int line,
|
|
235
|
+
int column) {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
V8_EXPORT_PRIVATE void SetDebugDelegate(Isolate* isolate,
|
|
241
|
+
DebugDelegate* listener);
|
|
242
|
+
|
|
243
|
+
#if V8_ENABLE_WEBASSEMBLY
|
|
244
|
+
V8_EXPORT_PRIVATE void TierDownAllModulesPerIsolate(Isolate* isolate);
|
|
245
|
+
V8_EXPORT_PRIVATE void TierUpAllModulesPerIsolate(Isolate* isolate);
|
|
246
|
+
#endif // V8_ENABLE_WEBASSEMBLY
|
|
247
|
+
|
|
248
|
+
class AsyncEventDelegate {
|
|
249
|
+
public:
|
|
250
|
+
virtual ~AsyncEventDelegate() = default;
|
|
251
|
+
virtual void AsyncEventOccurred(debug::DebugAsyncActionType type, int id,
|
|
252
|
+
bool is_blackboxed) = 0;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
void SetAsyncEventDelegate(Isolate* isolate, AsyncEventDelegate* delegate);
|
|
256
|
+
|
|
257
|
+
void ResetBlackboxedStateCache(Isolate* isolate,
|
|
258
|
+
v8::Local<debug::Script> script);
|
|
259
|
+
|
|
260
|
+
int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value);
|
|
261
|
+
|
|
262
|
+
enum Builtin { kStringToLowerCase };
|
|
263
|
+
|
|
264
|
+
Local<Function> GetBuiltin(Isolate* isolate, Builtin builtin);
|
|
265
|
+
|
|
266
|
+
V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
|
|
267
|
+
ConsoleDelegate* delegate);
|
|
268
|
+
|
|
269
|
+
V8_DEPRECATED("See http://crbug.com/v8/10566.")
|
|
270
|
+
int GetStackFrameId(v8::Local<v8::StackFrame> frame);
|
|
271
|
+
|
|
272
|
+
v8::Local<v8::StackTrace> GetDetailedStackTrace(Isolate* isolate,
|
|
273
|
+
v8::Local<v8::Object> error);
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Native wrapper around v8::internal::JSGeneratorObject object.
|
|
277
|
+
*/
|
|
278
|
+
class GeneratorObject {
|
|
279
|
+
public:
|
|
280
|
+
v8::MaybeLocal<debug::Script> Script();
|
|
281
|
+
v8::Local<v8::Function> Function();
|
|
282
|
+
debug::Location SuspendedLocation();
|
|
283
|
+
bool IsSuspended();
|
|
284
|
+
|
|
285
|
+
static v8::Local<debug::GeneratorObject> Cast(v8::Local<v8::Value> value);
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
/*
|
|
289
|
+
* Provide API layer between inspector and code coverage.
|
|
290
|
+
*/
|
|
291
|
+
class V8_EXPORT_PRIVATE Coverage {
|
|
292
|
+
public:
|
|
293
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(Coverage);
|
|
294
|
+
|
|
295
|
+
// Forward declarations.
|
|
296
|
+
class ScriptData;
|
|
297
|
+
class FunctionData;
|
|
298
|
+
|
|
299
|
+
class V8_EXPORT_PRIVATE BlockData {
|
|
300
|
+
public:
|
|
301
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(BlockData);
|
|
302
|
+
|
|
303
|
+
int StartOffset() const;
|
|
304
|
+
int EndOffset() const;
|
|
305
|
+
uint32_t Count() const;
|
|
306
|
+
|
|
307
|
+
private:
|
|
308
|
+
explicit BlockData(i::CoverageBlock* block,
|
|
309
|
+
std::shared_ptr<i::Coverage> coverage)
|
|
310
|
+
: block_(block), coverage_(std::move(coverage)) {}
|
|
311
|
+
|
|
312
|
+
i::CoverageBlock* block_;
|
|
313
|
+
std::shared_ptr<i::Coverage> coverage_;
|
|
314
|
+
|
|
315
|
+
friend class v8::debug::Coverage::FunctionData;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
class V8_EXPORT_PRIVATE FunctionData {
|
|
319
|
+
public:
|
|
320
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(FunctionData);
|
|
321
|
+
|
|
322
|
+
int StartOffset() const;
|
|
323
|
+
int EndOffset() const;
|
|
324
|
+
uint32_t Count() const;
|
|
325
|
+
MaybeLocal<String> Name() const;
|
|
326
|
+
size_t BlockCount() const;
|
|
327
|
+
bool HasBlockCoverage() const;
|
|
328
|
+
BlockData GetBlockData(size_t i) const;
|
|
329
|
+
|
|
330
|
+
private:
|
|
331
|
+
explicit FunctionData(i::CoverageFunction* function,
|
|
332
|
+
std::shared_ptr<i::Coverage> coverage)
|
|
333
|
+
: function_(function), coverage_(std::move(coverage)) {}
|
|
334
|
+
|
|
335
|
+
i::CoverageFunction* function_;
|
|
336
|
+
std::shared_ptr<i::Coverage> coverage_;
|
|
337
|
+
|
|
338
|
+
friend class v8::debug::Coverage::ScriptData;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
class V8_EXPORT_PRIVATE ScriptData {
|
|
342
|
+
public:
|
|
343
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(ScriptData);
|
|
344
|
+
|
|
345
|
+
Local<debug::Script> GetScript() const;
|
|
346
|
+
size_t FunctionCount() const;
|
|
347
|
+
FunctionData GetFunctionData(size_t i) const;
|
|
348
|
+
|
|
349
|
+
private:
|
|
350
|
+
explicit ScriptData(size_t index, std::shared_ptr<i::Coverage> c);
|
|
351
|
+
|
|
352
|
+
i::CoverageScript* script_;
|
|
353
|
+
std::shared_ptr<i::Coverage> coverage_;
|
|
354
|
+
|
|
355
|
+
friend class v8::debug::Coverage;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
static Coverage CollectPrecise(Isolate* isolate);
|
|
359
|
+
static Coverage CollectBestEffort(Isolate* isolate);
|
|
360
|
+
|
|
361
|
+
static void SelectMode(Isolate* isolate, CoverageMode mode);
|
|
362
|
+
|
|
363
|
+
size_t ScriptCount() const;
|
|
364
|
+
ScriptData GetScriptData(size_t i) const;
|
|
365
|
+
bool IsEmpty() const { return coverage_ == nullptr; }
|
|
366
|
+
|
|
367
|
+
private:
|
|
368
|
+
explicit Coverage(std::shared_ptr<i::Coverage> coverage)
|
|
369
|
+
: coverage_(std::move(coverage)) {}
|
|
370
|
+
std::shared_ptr<i::Coverage> coverage_;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/*
|
|
374
|
+
* Provide API layer between inspector and type profile.
|
|
375
|
+
*/
|
|
376
|
+
class V8_EXPORT_PRIVATE TypeProfile {
|
|
377
|
+
public:
|
|
378
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(TypeProfile);
|
|
379
|
+
|
|
380
|
+
class ScriptData; // Forward declaration.
|
|
381
|
+
|
|
382
|
+
class V8_EXPORT_PRIVATE Entry {
|
|
383
|
+
public:
|
|
384
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(Entry);
|
|
385
|
+
|
|
386
|
+
int SourcePosition() const;
|
|
387
|
+
std::vector<MaybeLocal<String>> Types() const;
|
|
388
|
+
|
|
389
|
+
private:
|
|
390
|
+
explicit Entry(const i::TypeProfileEntry* entry,
|
|
391
|
+
std::shared_ptr<i::TypeProfile> type_profile)
|
|
392
|
+
: entry_(entry), type_profile_(std::move(type_profile)) {}
|
|
393
|
+
|
|
394
|
+
const i::TypeProfileEntry* entry_;
|
|
395
|
+
std::shared_ptr<i::TypeProfile> type_profile_;
|
|
396
|
+
|
|
397
|
+
friend class v8::debug::TypeProfile::ScriptData;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
class V8_EXPORT_PRIVATE ScriptData {
|
|
401
|
+
public:
|
|
402
|
+
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(ScriptData);
|
|
403
|
+
|
|
404
|
+
Local<debug::Script> GetScript() const;
|
|
405
|
+
std::vector<Entry> Entries() const;
|
|
406
|
+
|
|
407
|
+
private:
|
|
408
|
+
explicit ScriptData(size_t index,
|
|
409
|
+
std::shared_ptr<i::TypeProfile> type_profile);
|
|
410
|
+
|
|
411
|
+
i::TypeProfileScript* script_;
|
|
412
|
+
std::shared_ptr<i::TypeProfile> type_profile_;
|
|
413
|
+
|
|
414
|
+
friend class v8::debug::TypeProfile;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
static TypeProfile Collect(Isolate* isolate);
|
|
418
|
+
|
|
419
|
+
static void SelectMode(Isolate* isolate, TypeProfileMode mode);
|
|
420
|
+
|
|
421
|
+
size_t ScriptCount() const;
|
|
422
|
+
ScriptData GetScriptData(size_t i) const;
|
|
423
|
+
|
|
424
|
+
private:
|
|
425
|
+
explicit TypeProfile(std::shared_ptr<i::TypeProfile> type_profile)
|
|
426
|
+
: type_profile_(std::move(type_profile)) {}
|
|
427
|
+
|
|
428
|
+
std::shared_ptr<i::TypeProfile> type_profile_;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
class V8_EXPORT_PRIVATE ScopeIterator {
|
|
432
|
+
public:
|
|
433
|
+
static std::unique_ptr<ScopeIterator> CreateForFunction(
|
|
434
|
+
v8::Isolate* isolate, v8::Local<v8::Function> func);
|
|
435
|
+
static std::unique_ptr<ScopeIterator> CreateForGeneratorObject(
|
|
436
|
+
v8::Isolate* isolate, v8::Local<v8::Object> generator);
|
|
437
|
+
|
|
438
|
+
ScopeIterator() = default;
|
|
439
|
+
virtual ~ScopeIterator() = default;
|
|
440
|
+
ScopeIterator(const ScopeIterator&) = delete;
|
|
441
|
+
ScopeIterator& operator=(const ScopeIterator&) = delete;
|
|
442
|
+
|
|
443
|
+
enum ScopeType {
|
|
444
|
+
ScopeTypeGlobal = 0,
|
|
445
|
+
ScopeTypeLocal,
|
|
446
|
+
ScopeTypeWith,
|
|
447
|
+
ScopeTypeClosure,
|
|
448
|
+
ScopeTypeCatch,
|
|
449
|
+
ScopeTypeBlock,
|
|
450
|
+
ScopeTypeScript,
|
|
451
|
+
ScopeTypeEval,
|
|
452
|
+
ScopeTypeModule,
|
|
453
|
+
ScopeTypeWasmExpressionStack
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
virtual bool Done() = 0;
|
|
457
|
+
virtual void Advance() = 0;
|
|
458
|
+
virtual ScopeType GetType() = 0;
|
|
459
|
+
virtual v8::Local<v8::Object> GetObject() = 0;
|
|
460
|
+
virtual v8::Local<v8::Value> GetFunctionDebugName() = 0;
|
|
461
|
+
virtual int GetScriptId() = 0;
|
|
462
|
+
virtual bool HasLocationInfo() = 0;
|
|
463
|
+
virtual debug::Location GetStartLocation() = 0;
|
|
464
|
+
virtual debug::Location GetEndLocation() = 0;
|
|
465
|
+
|
|
466
|
+
virtual bool SetVariableValue(v8::Local<v8::String> name,
|
|
467
|
+
v8::Local<v8::Value> value) = 0;
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
class V8_EXPORT_PRIVATE StackTraceIterator {
|
|
471
|
+
public:
|
|
472
|
+
static std::unique_ptr<StackTraceIterator> Create(Isolate* isolate,
|
|
473
|
+
int index = 0);
|
|
474
|
+
StackTraceIterator() = default;
|
|
475
|
+
virtual ~StackTraceIterator() = default;
|
|
476
|
+
StackTraceIterator(const StackTraceIterator&) = delete;
|
|
477
|
+
StackTraceIterator& operator=(const StackTraceIterator&) = delete;
|
|
478
|
+
|
|
479
|
+
virtual bool Done() const = 0;
|
|
480
|
+
virtual void Advance() = 0;
|
|
481
|
+
|
|
482
|
+
virtual int GetContextId() const = 0;
|
|
483
|
+
virtual v8::MaybeLocal<v8::Value> GetReceiver() const = 0;
|
|
484
|
+
virtual v8::Local<v8::Value> GetReturnValue() const = 0;
|
|
485
|
+
virtual v8::Local<v8::String> GetFunctionDebugName() const = 0;
|
|
486
|
+
virtual v8::Local<v8::debug::Script> GetScript() const = 0;
|
|
487
|
+
virtual debug::Location GetSourceLocation() const = 0;
|
|
488
|
+
virtual v8::Local<v8::Function> GetFunction() const = 0;
|
|
489
|
+
virtual std::unique_ptr<ScopeIterator> GetScopeIterator() const = 0;
|
|
490
|
+
|
|
491
|
+
virtual v8::MaybeLocal<v8::Value> Evaluate(v8::Local<v8::String> source,
|
|
492
|
+
bool throw_on_side_effect) = 0;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
class QueryObjectPredicate {
|
|
496
|
+
public:
|
|
497
|
+
virtual ~QueryObjectPredicate() = default;
|
|
498
|
+
virtual bool Filter(v8::Local<v8::Object> object) = 0;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
void QueryObjects(v8::Local<v8::Context> context,
|
|
502
|
+
QueryObjectPredicate* predicate,
|
|
503
|
+
v8::PersistentValueVector<v8::Object>* objects);
|
|
504
|
+
|
|
505
|
+
void GlobalLexicalScopeNames(v8::Local<v8::Context> context,
|
|
506
|
+
v8::PersistentValueVector<v8::String>* names);
|
|
507
|
+
|
|
508
|
+
void SetReturnValue(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
|
509
|
+
|
|
510
|
+
enum class NativeAccessorType {
|
|
511
|
+
None = 0,
|
|
512
|
+
HasGetter = 1 << 0,
|
|
513
|
+
HasSetter = 1 << 1
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
int64_t GetNextRandomInt64(v8::Isolate* isolate);
|
|
517
|
+
|
|
518
|
+
using RuntimeCallCounterCallback =
|
|
519
|
+
std::function<void(const char* name, int64_t count, base::TimeDelta time)>;
|
|
520
|
+
void EnumerateRuntimeCallCounters(v8::Isolate* isolate,
|
|
521
|
+
RuntimeCallCounterCallback callback);
|
|
522
|
+
|
|
523
|
+
enum class EvaluateGlobalMode {
|
|
524
|
+
kDefault,
|
|
525
|
+
kDisableBreaks,
|
|
526
|
+
kDisableBreaksAndThrowOnSideEffect
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
V8_EXPORT_PRIVATE v8::MaybeLocal<v8::Value> EvaluateGlobal(
|
|
530
|
+
v8::Isolate* isolate, v8::Local<v8::String> source, EvaluateGlobalMode mode,
|
|
531
|
+
bool repl_mode = false);
|
|
532
|
+
|
|
533
|
+
V8_EXPORT_PRIVATE v8::MaybeLocal<v8::Value> EvaluateGlobalForTesting(
|
|
534
|
+
v8::Isolate* isolate, v8::Local<v8::Script> function,
|
|
535
|
+
v8::debug::EvaluateGlobalMode mode, bool repl);
|
|
536
|
+
|
|
537
|
+
int GetDebuggingId(v8::Local<v8::Function> function);
|
|
538
|
+
|
|
539
|
+
bool SetFunctionBreakpoint(v8::Local<v8::Function> function,
|
|
540
|
+
v8::Local<v8::String> condition, BreakpointId* id);
|
|
541
|
+
|
|
542
|
+
v8::Platform* GetCurrentPlatform();
|
|
543
|
+
|
|
544
|
+
void ForceGarbageCollection(
|
|
545
|
+
v8::Isolate* isolate,
|
|
546
|
+
v8::EmbedderHeapTracer::EmbedderStackState embedder_stack_state);
|
|
547
|
+
|
|
548
|
+
class V8_NODISCARD PostponeInterruptsScope {
|
|
549
|
+
public:
|
|
550
|
+
explicit PostponeInterruptsScope(v8::Isolate* isolate);
|
|
551
|
+
~PostponeInterruptsScope();
|
|
552
|
+
|
|
553
|
+
private:
|
|
554
|
+
std::unique_ptr<i::PostponeInterruptsScope> scope_;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
class V8_NODISCARD DisableBreakScope {
|
|
558
|
+
public:
|
|
559
|
+
explicit DisableBreakScope(v8::Isolate* isolate);
|
|
560
|
+
~DisableBreakScope();
|
|
561
|
+
|
|
562
|
+
private:
|
|
563
|
+
std::unique_ptr<i::DisableBreak> scope_;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
class WeakMap : public v8::Object {
|
|
567
|
+
public:
|
|
568
|
+
WeakMap() = delete;
|
|
569
|
+
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT v8::MaybeLocal<v8::Value> Get(
|
|
570
|
+
v8::Local<v8::Context> context, v8::Local<v8::Value> key);
|
|
571
|
+
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT v8::MaybeLocal<WeakMap> Set(
|
|
572
|
+
v8::Local<v8::Context> context, v8::Local<v8::Value> key,
|
|
573
|
+
v8::Local<v8::Value> value);
|
|
574
|
+
|
|
575
|
+
V8_EXPORT_PRIVATE static Local<WeakMap> New(v8::Isolate* isolate);
|
|
576
|
+
V8_INLINE static WeakMap* Cast(Value* obj);
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Pairs of accessors.
|
|
581
|
+
*
|
|
582
|
+
* In the case of private accessors, getters and setters are either null or
|
|
583
|
+
* Functions.
|
|
584
|
+
*/
|
|
585
|
+
class V8_EXPORT_PRIVATE AccessorPair : public v8::Value {
|
|
586
|
+
public:
|
|
587
|
+
AccessorPair() = delete;
|
|
588
|
+
v8::Local<v8::Value> getter();
|
|
589
|
+
v8::Local<v8::Value> setter();
|
|
590
|
+
|
|
591
|
+
static bool IsAccessorPair(v8::Local<v8::Value> obj);
|
|
592
|
+
V8_INLINE static AccessorPair* Cast(v8::Value* obj);
|
|
593
|
+
|
|
594
|
+
private:
|
|
595
|
+
static void CheckCast(v8::Value* obj);
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
struct PropertyDescriptor {
|
|
599
|
+
bool enumerable : 1;
|
|
600
|
+
bool has_enumerable : 1;
|
|
601
|
+
bool configurable : 1;
|
|
602
|
+
bool has_configurable : 1;
|
|
603
|
+
bool writable : 1;
|
|
604
|
+
bool has_writable : 1;
|
|
605
|
+
v8::Local<v8::Value> value;
|
|
606
|
+
v8::Local<v8::Value> get;
|
|
607
|
+
v8::Local<v8::Value> set;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
class PropertyIterator {
|
|
611
|
+
public:
|
|
612
|
+
// Creating a PropertyIterator can potentially throw an exception.
|
|
613
|
+
// The returned std::unique_ptr is empty iff that happens.
|
|
614
|
+
V8_WARN_UNUSED_RESULT static std::unique_ptr<PropertyIterator> Create(
|
|
615
|
+
v8::Local<v8::Context> context, v8::Local<v8::Object> object);
|
|
616
|
+
|
|
617
|
+
virtual ~PropertyIterator() = default;
|
|
618
|
+
|
|
619
|
+
virtual bool Done() const = 0;
|
|
620
|
+
// Returns |Nothing| should |Advance| throw an exception,
|
|
621
|
+
// |true| otherwise.
|
|
622
|
+
V8_WARN_UNUSED_RESULT virtual Maybe<bool> Advance() = 0;
|
|
623
|
+
|
|
624
|
+
virtual v8::Local<v8::Name> name() const = 0;
|
|
625
|
+
|
|
626
|
+
virtual bool is_native_accessor() = 0;
|
|
627
|
+
virtual bool has_native_getter() = 0;
|
|
628
|
+
virtual bool has_native_setter() = 0;
|
|
629
|
+
virtual Maybe<PropertyAttribute> attributes() = 0;
|
|
630
|
+
virtual Maybe<PropertyDescriptor> descriptor() = 0;
|
|
631
|
+
|
|
632
|
+
virtual bool is_own() = 0;
|
|
633
|
+
virtual bool is_array_index() = 0;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
#if V8_ENABLE_WEBASSEMBLY
|
|
637
|
+
class V8_EXPORT_PRIVATE WasmValueObject : public v8::Object {
|
|
638
|
+
public:
|
|
639
|
+
WasmValueObject() = delete;
|
|
640
|
+
static bool IsWasmValueObject(v8::Local<v8::Value> obj);
|
|
641
|
+
static WasmValueObject* Cast(v8::Value* value) {
|
|
642
|
+
#ifdef V8_ENABLE_CHECKS
|
|
643
|
+
CheckCast(value);
|
|
644
|
+
#endif
|
|
645
|
+
return static_cast<WasmValueObject*>(value);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
v8::Local<v8::String> type() const;
|
|
649
|
+
|
|
650
|
+
private:
|
|
651
|
+
static void CheckCast(v8::Value* obj);
|
|
652
|
+
};
|
|
653
|
+
#endif // V8_ENABLE_WEBASSEMBLY
|
|
654
|
+
|
|
655
|
+
AccessorPair* AccessorPair::Cast(v8::Value* value) {
|
|
656
|
+
#ifdef V8_ENABLE_CHECKS
|
|
657
|
+
CheckCast(value);
|
|
658
|
+
#endif
|
|
659
|
+
return static_cast<AccessorPair*>(value);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
MaybeLocal<Message> GetMessageFromPromise(Local<Promise> promise);
|
|
663
|
+
|
|
664
|
+
} // namespace debug
|
|
665
|
+
} // namespace v8
|
|
666
|
+
|
|
667
|
+
#endif // V8_DEBUG_DEBUG_INTERFACE_H_
|