diff --git a/src/document/libdom/doc.c b/src/document/libdom/doc.c index fb6b6d98b..0140da41b 100644 --- a/src/document/libdom/doc.c +++ b/src/document/libdom/doc.c @@ -59,9 +59,6 @@ js_html_document_user_data_handler(dom_node_operation operation, if (map_privates) { attr_erase_from_map(map_privates, data); } - if (map_elements) { - attr_erase_from_map(map_elements, data); - } #endif //fprintf(stderr, "DELETED: data=%p src=%p dst=%p\n", data, src, dst); /* This is the only path I expect */ diff --git a/src/js/quickjs.c b/src/js/quickjs.c index b4b2ab40b..260358641 100644 --- a/src/js/quickjs.c +++ b/src/js/quickjs.c @@ -158,7 +158,6 @@ quickjs_init(struct module *module) map_attributes = attr_create_new_attributes_map(); map_rev_attributes = attr_create_new_attributes_map_rev(); map_doctypes = attr_create_new_doctypes_map(); - map_elements = attr_create_new_elements_map(); map_privates = attr_create_new_privates_map_void(); map_form = attr_create_new_form_map(); map_form_rev = attr_create_new_form_map_rev(); @@ -193,8 +192,6 @@ quickjs_done(struct module *xxx) attr_delete_map(map_attributes); attr_delete_map_rev(map_rev_attributes); attr_delete_map(map_doctypes); - attr_delete_map(map_elements); - map_elements = NULL; attr_delete_map_void(map_privates); map_privates = NULL; attr_delete_map(map_form); diff --git a/src/js/quickjs/element.c b/src/js/quickjs/element.c index 859dac9da..5d8f83d64 100644 --- a/src/js/quickjs/element.c +++ b/src/js/quickjs/element.c @@ -3858,9 +3858,6 @@ static const JSCFunctionListEntry js_element_proto_funcs[] = { JS_CFUNC_DEF("toString", 0, js_element_toString) }; -void *map_elements; -//static std::map map_elements; - static void js_element_finalizer(JSRuntime *rt, JSValue val) { @@ -3899,7 +3896,6 @@ fprintf(stderr, "Before: %s:%d\n", __FUNCTION__, __LINE__); free_list(el_private->listeners); JS_FreeValueRT(rt, el_private->thisval); - attr_erase_from_map_str(map_elements, el_private->node); mem_free(el_private); } } @@ -3963,21 +3959,6 @@ getElement(JSContext *ctx, void *node) #ifdef ECMASCRIPT_DEBUG fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); #endif - -// JSValue second; -// static int initialized; -// /* create the element class */ -// if (!initialized) { -// JS_NewClassID(&js_element_class_id); -// JS_NewClass(JS_GetRuntime(ctx), js_element_class_id, &js_element_class); -// initialized = 1; -// } -// second = attr_find_in_map(map_elements, node); -// -// if (!JS_IsNull(second)) { -// JSValue r = JS_DupValue(ctx, second); -// RETURN_JS(r); -// } struct js_element_private *el_private = (struct js_element_private *)mem_calloc(1, sizeof(*el_private)); if (!el_private) { @@ -3999,7 +3980,6 @@ fprintf(stderr, "Before: %s:%d\n", __FUNCTION__, __LINE__); dom_node_ref((dom_node *)node); JS_SetOpaque(element_obj, el_private); - attr_save_in_map(map_elements, node, element_obj); attr_save_in_map_void(map_privates, node, el_private); void *old_node_data = NULL; diff --git a/src/js/quickjs/mapa.h b/src/js/quickjs/mapa.h index 5c339b5ae..c671c135c 100644 --- a/src/js/quickjs/mapa.h +++ b/src/js/quickjs/mapa.h @@ -13,7 +13,6 @@ extern void *map_attrs; extern void *map_attributes; extern void *map_rev_attributes; extern void *map_doctypes; -extern void *map_elements; extern void *map_privates; extern void *map_form; extern void *map_form_rev;