Skip to content

Commit

Permalink
feat(core): remove default HeapLimitSlowGrowthStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
churchill-zhang authored and zoomchan-cxj committed Feb 20, 2023
1 parent 573dcc0 commit 0a2ec24
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions android/sdk/src/main/jni/src/bridge/entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ using V8VMInitParam = hippy::napi::V8VMInitParam;
using V8InspectorClientImpl = hippy::inspector::V8InspectorClientImpl;
#endif

#ifndef DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES
#define DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES 0
#endif
#ifndef DEFAULT_MAX_HEAP_SIZE_IN_BYTES
#define DEFAULT_MAX_HEAP_SIZE_IN_BYTES (10 * hippy::base::MB);
#endif

constexpr char kLogTag[] = "native";

static std::unordered_map<int64_t, std::pair<std::shared_ptr<Engine>, uint32_t>>
Expand Down Expand Up @@ -542,17 +535,6 @@ jlong InitInstance(JNIEnv* j_env,
param->maximum_heap_size_in_bytes =
hippy::base::checked_numeric_cast<jlong, size_t>(maximum_heap_size_in_bytes);
TDF_BASE_CHECK(param->initial_heap_size_in_bytes <= param->maximum_heap_size_in_bytes);
#ifndef V8_WITHOUT_INSPECTOR
} else if (!runtime->IsDebug()) {
// When V8 inspector enable the js debugger, `near_heap_limit_callback` will be overridden,
// so if in debug mode, should not set heap limit via `V8VMInitParam`
#else
} else {
#endif
param = std::make_shared<V8VMInitParam>();
param->initial_heap_size_in_bytes = DEFAULT_INITIAL_HEAP_SIZE_IN_BYTES;
param->maximum_heap_size_in_bytes = DEFAULT_MAX_HEAP_SIZE_IN_BYTES;
param->near_heap_limit_callback = V8VMInitParam::HeapLimitSlowGrowthStrategy;
}
} while (false);

Expand Down

0 comments on commit 0a2ec24

Please sign in to comment.