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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCallStack.h

Issue 2010603002: Use SourceLocation when reporting runtime exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2004243002
Patch Set: test fixes Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2010 Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "platform/v8_inspector/public/V8StackTrace.h" 36 #include "platform/v8_inspector/public/V8StackTrace.h"
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class TracedValue; 42 class TracedValue;
43 43
44 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> { 44 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> {
45 public: 45 public:
46 static PassRefPtr<ScriptCallStack> create(v8::Isolate*, v8::Local<v8::StackT race>, size_t maxStackSize = V8StackTrace::maxCallStackSizeToCapture);
47 static PassRefPtr<ScriptCallStack> capture(size_t maxStackSize = V8StackTrac e::maxCallStackSizeToCapture); 46 static PassRefPtr<ScriptCallStack> capture(size_t maxStackSize = V8StackTrac e::maxCallStackSizeToCapture);
48 static PassRefPtr<ScriptCallStack> captureForConsole(); 47 static PassRefPtr<ScriptCallStack> captureForConsole();
49 48
50 ~ScriptCallStack(); 49 ~ScriptCallStack();
51 50
52 bool isEmpty() const; 51 bool isEmpty() const;
53 String topSourceURL() const; 52 String topSourceURL() const;
54 unsigned topLineNumber() const; 53 unsigned topLineNumber() const;
55 unsigned topColumnNumber() const; 54 unsigned topColumnNumber() const;
56 55
57 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const; 56 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const;
58 void toTracedValue(TracedValue*, const char* name) const; 57 void toTracedValue(TracedValue*, const char* name) const;
59 String toString() const; 58 String toString() const;
60 std::unique_ptr<V8StackTrace> copyStackTrace() const; 59 std::unique_ptr<V8StackTrace> copyStackTrace() const;
61 60
62 private: 61 private:
63 explicit ScriptCallStack(std::unique_ptr<V8StackTrace>); 62 explicit ScriptCallStack(std::unique_ptr<V8StackTrace>);
64 std::unique_ptr<V8StackTrace> m_stackTrace; 63 std::unique_ptr<V8StackTrace> m_stackTrace;
65 }; 64 };
66 65
67 } // namespace blink 66 } // namespace blink
68 67
69 #endif // ScriptCallStack_h 68 #endif // ScriptCallStack_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698