Skip to content

Commit 0a2ec24

Browse files
churchill-zhangzoomchan-cxj
authored andcommitted
feat(core): remove default HeapLimitSlowGrowthStrategy
1 parent 573dcc0 commit 0a2ec24

File tree

1 file changed

+0
-18
lines changed
  • android/sdk/src/main/jni/src/bridge

1 file changed

+0
-18
lines changed

android/sdk/src/main/jni/src/bridge/entry.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ using V8VMInitParam = hippy::napi::V8VMInitParam;
9494
using V8InspectorClientImpl = hippy::inspector::V8InspectorClientImpl;
9595
#endif
9696

97-
#ifndef DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES
98-
#define DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES 0
99-
#endif
100-
#ifndef DEFAULT_MAX_HEAP_SIZE_IN_BYTES
101-
#define DEFAULT_MAX_HEAP_SIZE_IN_BYTES (10 * hippy::base::MB);
102-
#endif
103-
10497
constexpr char kLogTag[] = "native";
10598

10699
static std::unordered_map<int64_t, std::pair<std::shared_ptr<Engine>, uint32_t>>
@@ -542,17 +535,6 @@ jlong InitInstance(JNIEnv* j_env,
542535
param->maximum_heap_size_in_bytes =
543536
hippy::base::checked_numeric_cast<jlong, size_t>(maximum_heap_size_in_bytes);
544537
TDF_BASE_CHECK(param->initial_heap_size_in_bytes <= param->maximum_heap_size_in_bytes);
545-
#ifndef V8_WITHOUT_INSPECTOR
546-
} else if (!runtime->IsDebug()) {
547-
// When V8 inspector enable the js debugger, `near_heap_limit_callback` will be overridden,
548-
// so if in debug mode, should not set heap limit via `V8VMInitParam`
549-
#else
550-
} else {
551-
#endif
552-
param = std::make_shared<V8VMInitParam>();
553-
param->initial_heap_size_in_bytes = DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES;
554-
param->maximum_heap_size_in_bytes = DEFAULT_MAX_HEAP_SIZE_IN_BYTES;
555-
param->near_heap_limit_callback = V8VMInitParam::HeapLimitSlowGrowthStrategy;
556538
}
557539
} while (false);
558540

0 commit comments

Comments
 (0)