From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/dispex.c | 4 ++++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/es5.js | 1 - 3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a6214aa666d..1cbb3388f87 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2821,7 +2821,10 @@ static HRESULT get_prototype(HTMLInnerWindow *script_global, prototype_id_t id, if(!info) { info = preprocess_dispex_data(desc, compat_mode, TRUE); if(info) { + if(!desc->prototype_name[0]) + sprintf(desc->prototype_name, "%sPrototype", desc->name); info->vtbl = &prototype_dispex_vtbl; + info->name = desc->prototype_name; desc->prototype_info[compat_mode - COMPAT_MODE_IE9] = info; } } @@ -2908,4 +2911,5 @@ HRESULT get_constructor(HTMLInnerWindow *script_global, prototype_id_t id, Dispa constr->id = id; *ret = script_global->constructors[id] = &constr->dispex; return S_OK; + } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index eb00a7b3629..4f6b0bb11c0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -427,6 +427,7 @@ typedef struct { dispex_data_t *prototype_info[COMPAT_MODE_CNT - COMPAT_MODE_IE9]; dispex_data_t *delayed_init_info; prototype_id_t id; + char prototype_name[64]; } dispex_static_data_t;
#define X(name) extern dispex_static_data_t name ## _dispex; diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 62e8f8e9c0f..880b59a85ff 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2733,7 +2733,6 @@ sync_test("prototypes", function() { ok(DOMImplementation == "[object DOMImplementation]", "DOMImplementation = " + DOMImplementation);
var proto = constr.prototype; - todo_wine. ok(proto == "[object DOMImplementationPrototype]", "DOMImplementation.prototype = " + proto); ok(Object.getPrototypeOf(document.implementation) === proto, "Object.getPrototypeOf(document.implementation) = " + Object.getPrototypeOf(document.implementation));