Skip to content

Commit 903550a

Browse files
author
david
committed
feat: add dart_isolate_context.cc
1 parent 7e3b7df commit 903550a

File tree

15 files changed

+149
-202
lines changed

15 files changed

+149
-202
lines changed

bridge/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,23 @@ if (DEFINED PLATFORM)
8585
endif()
8686

8787
list(APPEND BRIDGE_SOURCE
88-
# foundation/logging.cc
88+
foundation/logging.cc
8989
foundation/native_string.cc
9090
# foundation/ui_task_queue.cc
91-
# foundation/shared_ui_command.cc
91+
foundation/shared_ui_command.cc
9292
# foundation/inspector_task_queue.cc
9393
# foundation/task_queue.cc
9494
foundation/string_view.cc
9595
# foundation/native_value.cc
9696
# foundation/native_type.cc
9797
# foundation/stop_watch.cc
9898
# foundation/profiler.cc
99-
# foundation/dart_readable.cc
100-
# foundation/ui_command_buffer.cc
101-
# foundation/ui_command_strategy.cc
99+
foundation/dart_readable.cc
100+
foundation/ui_command_buffer.cc
101+
foundation/ui_command_strategy.cc
102102
# polyfill/dist/polyfill.cc
103-
# multiple_threading/dispatcher.cc
104-
# multiple_threading/looper.cc
103+
multiple_threading/dispatcher.cc
104+
multiple_threading/looper.cc
105105
${CMAKE_CURRENT_LIST_DIR}/third_party/dart/include/dart_api_dl.c
106106
)
107107

@@ -575,7 +575,7 @@ elseif ($ENV{WEBF_JS_ENGINE} MATCHES "v8")
575575
bindings/v8/wrapper_type_info.cc
576576
bindings/v8/v8_interface_bridge_base.cc
577577
bindings/v8/v8_initializer.cc
578-
bindings/v8/platform/script_state.cc
578+
# bindings/v8/platform/script_state.cc
579579
bindings/v8/platform/scoped_persistent.h
580580
bindings/v8/platform/v8_per_context_data.cc
581581
bindings/v8/platform/v8_per_isolate_data.cc
@@ -679,10 +679,10 @@ list(APPEND BRIDGE_SOURCE
679679
# Core sources
680680
webf_bridge.cc
681681
# core/api/api.cc
682-
# core/executing_context.cc
682+
core/executing_context.cc
683683
# core/script_forbidden_scope.cc
684-
# core/script_state.cc
685-
# core/page.cc
684+
core/script_state.cc
685+
core/page.cc
686686
core/dart_methods.cc
687687
core/dart_isolate_context.cc
688688
# core/dart_context_data.cc

bridge/bindings/v8/platform/script_state_test.cc

Lines changed: 0 additions & 13 deletions
This file was deleted.

bridge/bindings/v8/platform/v8_per_context_data.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//#include "base/memory/ptr_util.h"
1313
//#include "components/crash/core/common/crash_key.h"
1414
//#include "third_party/blink/renderer/platform/bindings/origin_trial_features.h"
15-
#include "bindings/v8/platform/script_state.h"
15+
//#include "bindings/v8/platform/script_state.h"
1616
//#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
1717
//#include "third_party/blink/renderer/platform/bindings/v8_object_constructor.h"
1818
#include "bindings/v8/wrapper_type_info.h"

bridge/bindings/v8/platform/v8_per_isolate_data.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//#include "bindings/v8/platform/dom_data_store.h"
2222
//#include "bindings/v8/platform/script_forbidden_scope.h"
2323
//#include "bindings/v8/platform/script_regexp.h"
24-
#include "bindings/v8/platform/script_state.h"
24+
//#include "bindings/v8/platform/script_state.h"
2525
//#include "bindings/v8/platform/thread_debugger.h"
2626
//#include "bindings/v8/platform/v8_binding.h"
2727
//#include "bindings/v8/platform/v8_histogram_accumulator.h"

bridge/core/dart_isolate_context.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include <unordered_set>
1010
#include "dart_isolate_context.h"
1111
//#include "event_factory.h"
12-
#include "html_element_factory.h"
13-
//#include "names_installer.h"
14-
//#include "page.h"
15-
#include "svg_element_factory.h"
12+
//#include "html_element_factory.h"
13+
#include "names_installer.h"
14+
#include "page.h"
15+
//#include "svg_element_factory.h"
1616

1717
namespace webf {
1818

@@ -82,7 +82,7 @@ void InitializeBuiltInStrings(JSContext* ctx) {
8282
#elif WEBF_V8_JS_ENGINE
8383
void InitializeBuiltInStrings(v8::Isolate* isolate) {
8484
if (!is_name_installed_) {
85-
names_installer::Init(isolate);
85+
// names_installer::Init(isolate);
8686
is_name_installed_ = true;
8787
}
8888
}
@@ -121,8 +121,8 @@ void DartIsolateContext::FinalizeJSRuntime() {
121121

122122
// Prebuilt strings stored in JSRuntime. Only needs to dispose when runtime disposed.
123123
// names_installer::Dispose();
124-
HTMLElementFactory::Dispose();
125-
SVGElementFactory::Dispose();
124+
// HTMLElementFactory::Dispose();
125+
// SVGElementFactory::Dispose();
126126
// EventFactory::Dispose();
127127

128128
#if WEBF_QUICKJS_JS_ENGINE
@@ -176,11 +176,11 @@ void DartIsolateContext::InitializeNewPageInJSThread(PageGroup* page_group,
176176
int32_t sync_buffer_size,
177177
Dart_Handle dart_handle,
178178
AllocateNewPageCallback result_callback) {
179-
dart_isolate_context->profiler()->StartTrackInitialize();
179+
// dart_isolate_context->profiler()->StartTrackInitialize();
180180
DartIsolateContext::InitializeJSRuntime();
181181
auto* page = new WebFPage(dart_isolate_context, true, sync_buffer_size, page_context_id, nullptr);
182182

183-
dart_isolate_context->profiler()->FinishTrackInitialize();
183+
// dart_isolate_context->profiler()->FinishTrackInitialize();
184184

185185
dart_isolate_context->dispatcher_->PostToDart(true, HandleNewPageResult, page_group, dart_handle, result_callback,
186186
page);

0 commit comments

Comments
 (0)