Commit d7a18896 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[inspector] enable inspector by default

To achieve this:
- fixed crash on windows - String16::fromInteger used "%zu" which doesn't support by VS2013 compiler, wrapped with ifdef else.
- fixed asan for d8 - unique_ptr on array has single element type.
- force Debugger.disable at the end of test.

BUG=chromium:635948
R=dgozman@chromium.org,yangguo@chromium.org,machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2450653002
Cr-Commit-Position: refs/heads/master@{#40546}
parent 8f770ad9
......@@ -26,7 +26,7 @@ v8_experimental_extra_library_files =
declare_args() {
# Enable inspector. See include/v8-inspector.h.
v8_enable_inspector = false
v8_enable_inspector = true
}
v8_enable_inspector_override = v8_enable_inspector
......@@ -1867,7 +1867,7 @@ class InspectorClient : public v8_inspector::V8InspectorClient {
v8_inspector::V8InspectorSession* session =
InspectorClient::GetSession(context);
int length = message->Length();
std::unique_ptr<uint16_t> buffer(new uint16_t[length]);
std::unique_ptr<uint16_t[]> buffer(new uint16_t[length]);
message->Write(buffer.get(), 0, length);
v8_inspector::StringView message_view(buffer.get(), length);
session->dispatchProtocolMessage(message_view);
......
......@@ -377,7 +377,11 @@ String16 String16::fromInteger(int number) {
String16 String16::fromInteger(size_t number) {
const size_t kBufferSize = 50;
char buffer[kBufferSize];
#if !defined(_WIN32) && !defined(_WIN64)
v8::base::OS::SNPrintF(buffer, kBufferSize, "%zu", number);
#else
v8::base::OS::SNPrintF(buffer, kBufferSize, "%Iu", number);
#endif
return String16(buffer);
}
......
......@@ -100,7 +100,10 @@ InspectorTest.logObject = function(object, title)
InspectorTest.log(lines.join("\n"));
}
InspectorTest.completeTest = quit.bind(null);
InspectorTest.completeTest = function()
{
Protocol.Debugger.disable().then(() => quit());
}
InspectorTest.completeTestAfterPendingTimeouts = function()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment