Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/d8.cc

Issue 2450653002: [inspector] enable inspector by default (Closed)
Patch Set: disable debugger after test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build_overrides/v8.gni ('k') | src/inspector/string-16.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 static void SendInspectorMessage( 1860 static void SendInspectorMessage(
1861 const v8::FunctionCallbackInfo<v8::Value>& args) { 1861 const v8::FunctionCallbackInfo<v8::Value>& args) {
1862 Isolate* isolate = args.GetIsolate(); 1862 Isolate* isolate = args.GetIsolate();
1863 v8::HandleScope handle_scope(isolate); 1863 v8::HandleScope handle_scope(isolate);
1864 Local<Context> context = isolate->GetCurrentContext(); 1864 Local<Context> context = isolate->GetCurrentContext();
1865 args.GetReturnValue().Set(Undefined(isolate)); 1865 args.GetReturnValue().Set(Undefined(isolate));
1866 Local<String> message = args[0]->ToString(context).ToLocalChecked(); 1866 Local<String> message = args[0]->ToString(context).ToLocalChecked();
1867 v8_inspector::V8InspectorSession* session = 1867 v8_inspector::V8InspectorSession* session =
1868 InspectorClient::GetSession(context); 1868 InspectorClient::GetSession(context);
1869 int length = message->Length(); 1869 int length = message->Length();
1870 std::unique_ptr<uint16_t> buffer(new uint16_t[length]); 1870 std::unique_ptr<uint16_t[]> buffer(new uint16_t[length]);
1871 message->Write(buffer.get(), 0, length); 1871 message->Write(buffer.get(), 0, length);
1872 v8_inspector::StringView message_view(buffer.get(), length); 1872 v8_inspector::StringView message_view(buffer.get(), length);
1873 session->dispatchProtocolMessage(message_view); 1873 session->dispatchProtocolMessage(message_view);
1874 args.GetReturnValue().Set(True(isolate)); 1874 args.GetReturnValue().Set(True(isolate));
1875 } 1875 }
1876 1876
1877 static const int kContextGroupId = 1; 1877 static const int kContextGroupId = 1;
1878 1878
1879 std::unique_ptr<v8_inspector::V8Inspector> inspector_; 1879 std::unique_ptr<v8_inspector::V8Inspector> inspector_;
1880 std::unique_ptr<v8_inspector::V8InspectorSession> session_; 1880 std::unique_ptr<v8_inspector::V8InspectorSession> session_;
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 } 2948 }
2949 2949
2950 } // namespace v8 2950 } // namespace v8
2951 2951
2952 2952
2953 #ifndef GOOGLE3 2953 #ifndef GOOGLE3
2954 int main(int argc, char* argv[]) { 2954 int main(int argc, char* argv[]) {
2955 return v8::Shell::Main(argc, argv); 2955 return v8::Shell::Main(argc, argv);
2956 } 2956 }
2957 #endif 2957 #endif
OLDNEW
« no previous file with comments | « build_overrides/v8.gni ('k') | src/inspector/string-16.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698