When calling console set `this` value
Summary: When calling the original console methods we should set this to the value of the original console. Otherwise this can lead to different behaviour between when the debugger is enabled or not. Changelog: [Internal] Reviewed By: mhorowitz Differential Revision: D25367929 fbshipit-source-id: 0a7b65e501d4460d5e09a7ccd3c38ef61fbd2ef0
This commit is contained in:
Родитель
f96478778c
Коммит
b26a9549ce
|
@ -185,7 +185,7 @@ void Inspector::installConsoleFunction(
|
|||
auto obj = val.getObject(runtime);
|
||||
if (obj.isFunction(runtime)) {
|
||||
auto func = obj.getFunction(runtime);
|
||||
func.call(runtime, args, count);
|
||||
func.callWithThis(runtime, *originalConsole, args, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче