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

Side by Side Diff: src/d8.cc

Issue 2510093002: [inspector] gracefully handle stack overflows in the inspector. (Closed)
Patch Set: fix asan Created 4 years 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 | « no previous file | src/inspector/java-script-call-frame.h » ('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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 if (try_catch.HasCaught()) { 1924 if (try_catch.HasCaught()) {
1925 Local<Object> exception = Local<Object>::Cast(try_catch.Exception()); 1925 Local<Object> exception = Local<Object>::Cast(try_catch.Exception());
1926 Local<String> key = v8::String::NewFromUtf8(isolate_, "message", 1926 Local<String> key = v8::String::NewFromUtf8(isolate_, "message",
1927 v8::NewStringType::kNormal) 1927 v8::NewStringType::kNormal)
1928 .ToLocalChecked(); 1928 .ToLocalChecked();
1929 Local<String> expected = 1929 Local<String> expected =
1930 v8::String::NewFromUtf8(isolate_, 1930 v8::String::NewFromUtf8(isolate_,
1931 "Maximum call stack size exceeded", 1931 "Maximum call stack size exceeded",
1932 v8::NewStringType::kNormal) 1932 v8::NewStringType::kNormal)
1933 .ToLocalChecked(); 1933 .ToLocalChecked();
1934 CHECK(exception->Get(context, key) 1934 Local<Value> value = exception->Get(context, key).ToLocalChecked();
1935 .ToLocalChecked() 1935 CHECK(value->StrictEquals(expected));
1936 ->StrictEquals(expected));
1937 } 1936 }
1938 #endif 1937 #endif
1939 } 1938 }
1940 } 1939 }
1941 1940
1942 Isolate* isolate_; 1941 Isolate* isolate_;
1943 Global<Context> context_; 1942 Global<Context> context_;
1944 }; 1943 };
1945 1944
1946 class InspectorClient : public v8_inspector::V8InspectorClient { 1945 class InspectorClient : public v8_inspector::V8InspectorClient {
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 } 3077 }
3079 3078
3080 } // namespace v8 3079 } // namespace v8
3081 3080
3082 3081
3083 #ifndef GOOGLE3 3082 #ifndef GOOGLE3
3084 int main(int argc, char* argv[]) { 3083 int main(int argc, char* argv[]) {
3085 return v8::Shell::Main(argc, argv); 3084 return v8::Shell::Main(argc, argv);
3086 } 3085 }
3087 #endif 3086 #endif
OLDNEW
« no previous file with comments | « no previous file | src/inspector/java-script-call-frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698