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

Side by Side Diff: runtime/vm/exceptions.cc

Issue 933193002: - Increase the size of the preallocated stack trace to give (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "platform/address_sanitizer.h" 7 #include "platform/address_sanitizer.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 ~PreallocatedStacktraceBuilder() { } 100 ~PreallocatedStacktraceBuilder() { }
101 101
102 virtual void AddFrame(const Code& code, 102 virtual void AddFrame(const Code& code,
103 const Smi& offset, 103 const Smi& offset,
104 bool is_catch_frame); 104 bool is_catch_frame);
105 105
106 virtual bool FullStacktrace() const { return false; } 106 virtual bool FullStacktrace() const { return false; }
107 107
108 private: 108 private:
109 static const int kNumTopframes = 3; 109 static const int kNumTopframes = Stacktrace::kPreallocatedStackdepth / 2;
110 110
111 const Stacktrace& stacktrace_; 111 const Stacktrace& stacktrace_;
112 intptr_t cur_index_; 112 intptr_t cur_index_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(PreallocatedStacktraceBuilder); 114 DISALLOW_COPY_AND_ASSIGN(PreallocatedStacktraceBuilder);
115 }; 115 };
116 116
117 117
118 void PreallocatedStacktraceBuilder::AddFrame(const Code& code, 118 void PreallocatedStacktraceBuilder::AddFrame(const Code& code,
119 const Smi& offset, 119 const Smi& offset,
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 754
755 // Throw JavascriptCompatibilityError exception. 755 // Throw JavascriptCompatibilityError exception.
756 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { 756 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) {
757 const Array& exc_args = Array::Handle(Array::New(1)); 757 const Array& exc_args = Array::Handle(Array::New(1));
758 const String& msg_str = String::Handle(String::New(msg)); 758 const String& msg_str = String::Handle(String::New(msg));
759 exc_args.SetAt(0, msg_str); 759 exc_args.SetAt(0, msg_str);
760 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); 760 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args);
761 } 761 }
762 762
763 } // namespace dart 763 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698