| Index: src/inspector/v8-console.cc
|
| diff --git a/src/inspector/v8-console.cc b/src/inspector/v8-console.cc
|
| index fee61177e7a134183ca4208aaaeaed831b85d1c7..3e39e4321b5852995d6ca4c42ef59d0cf2409ffa 100644
|
| --- a/src/inspector/v8-console.cc
|
| +++ b/src/inspector/v8-console.cc
|
| @@ -714,6 +714,24 @@ v8::Local<v8::Object> V8Console::createConsole(
|
| createBoundFunctionProperty(context, console, "timeStamp",
|
| V8Console::timeStampCallback);
|
|
|
| + const char* jsConsoleAssert =
|
| + "(function(){\n"
|
| + "var assert = this.assert;\n"
|
| + "this.assert = (value, ...args) => value ? undefined : assert(value, "
|
| + "...args);\n"
|
| + "})";
|
| + v8::Local<v8::String> jsConsoleAssertSource =
|
| + toV8StringInternalized(isolate, jsConsoleAssert);
|
| + V8InspectorImpl* inspector = inspectedContext->inspector();
|
| + v8::Local<v8::Value> consoleAssertValue;
|
| + if (inspector->compileAndRunInternalScript(context, jsConsoleAssertSource)
|
| + .ToLocal(&consoleAssertValue) &&
|
| + consoleAssertValue->IsFunction()) {
|
| + v8::Local<v8::Function> consoleAssert =
|
| + v8::Local<v8::Function>::Cast(consoleAssertValue);
|
| + inspector->callFunction(consoleAssert, context, console, 0, nullptr);
|
| + }
|
| +
|
| if (hasMemoryAttribute)
|
| console->SetAccessorProperty(
|
| toV8StringInternalized(isolate, "memory"),
|
|
|