Skip to content

Commit 63113e3

Browse files
daviddavid
david
authored and
david
committed
fix: compile error
1 parent e1478ec commit 63113e3

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

bridge/core/frame/dom_timer.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
#include "dom_timer.h"
66

77
#include <utility>
8+
#include "core/executing_context.h"
9+
10+
#if WEBF_QUICKJS_JS_ENGINE
811
#include "bindings/qjs/cppgc/garbage_collected.h"
912
#include "bindings/qjs/qjs_engine_patch.h"
10-
#include "core/executing_context.h"
13+
#elif WEBF_V8_JS_ENGINE
14+
#endif
1115

1216
#if UNIT_TEST
1317
#include "webf_test_env.h"

bridge/core/frame/window_or_worker_global_scope.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int WindowOrWorkerGlobalScope::setTimeout(ExecutingContext* context,
203203
}
204204

205205
// Create a timer object to keep track timer callback.
206-
auto timer = DOMTimer::create(context, handler, DOMTimer::TimerKind::kOnce);
206+
auto timer = DOMTimer::create(context, callback, DOMTimer::TimerKind::kOnce);
207207
auto timer_id = context->dartMethodPtr()->setTimeout(context->isDedicated(), timer.get(), context->contextId(),
208208
handleTransientCallbackWrapper, timeout);
209209

bridge/core/frame/window_or_worker_global_scope.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "bindings/v8/exception_state.h"
1313
#endif
1414

15-
#include "bindings/qjs/qjs_function.h"
1615
#include "core/executing_context.h"
1716

1817
namespace webf {

bridge/scripts/code_generator/src/idl/generate/v8/generateSource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ function generateFunctionCallBody(blob: IDLBlob, declaration: FunctionDeclaratio
391391
isInstanceMethod: false
392392
}) {
393393
if (options.isConstructor && declaration.returnType.value == FunctionArgumentType.void) {
394-
return 'return JS_ThrowTypeError(ctx, "Illegal constructor");';
394+
// TODO V8 handle "Illegal constructor"
395+
// return 'return JS_ThrowTypeError(ctx, "Illegal constructor");';
396+
return 'return';
395397
}
396398

397399
let minimalRequiredArgc = 0;

bridge/scripts/code_generator/templates/idl_templates/v8/base.cc.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
#include "bindings/v8/v8_throw_exception.h"
1313
#include "defined_properties.h"
1414
#include "core/executing_context.h"
15-
#include "core/dom/element.h"
16-
#include "core/dom/text.h"
17-
#include "core/dom/document.h"
18-
#include "core/dom/document_fragment.h"
19-
#include "core/dom/comment.h"
20-
#include "core/input/touch_list.h"
21-
#include "core/dom/static_node_list.h"
22-
#include "core/html/html_all_collection.h"
15+
//#include "core/dom/element.h"
16+
//#include "core/dom/text.h"
17+
//#include "core/dom/document.h"
18+
//#include "core/dom/document_fragment.h"
19+
//#include "core/dom/comment.h"
20+
//#include "core/input/touch_list.h"
21+
//#include "core/dom/static_node_list.h"
22+
//#include "core/html/html_all_collection.h"
2323

2424
namespace webf {
2525

0 commit comments

Comments
 (0)