| Index: extensions/browser/extension_error.h
|
| diff --git a/extensions/browser/extension_error.h b/extensions/browser/extension_error.h
|
| index c5be1696e71ab1d9ba99bee385b31621cbe7b1da..6ee7791f66c603497fe6be5697c4cdcc8db2a59d 100644
|
| --- a/extensions/browser/extension_error.h
|
| +++ b/extensions/browser/extension_error.h
|
| @@ -11,6 +11,8 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/logging.h"
|
| #include "base/strings/string16.h"
|
| +#include "extensions/common/stack_frame.h"
|
| +#include "url/gurl.h"
|
|
|
| namespace extensions {
|
|
|
| @@ -83,52 +85,27 @@ class ManifestError : public ExtensionError {
|
|
|
| class RuntimeError : public ExtensionError {
|
| public:
|
| - struct StackFrame {
|
| - size_t line_number;
|
| - size_t column_number;
|
| - // This is stored as a string (rather than a url) since it can be a
|
| - // Chrome script file (e.g., event_bindings.js).
|
| - base::string16 url;
|
| - base::string16 function; // optional
|
| -
|
| - // STL-Required constructor
|
| - StackFrame();
|
| -
|
| - StackFrame(size_t frame_line,
|
| - size_t frame_column,
|
| - const base::string16& frame_url,
|
| - const base::string16& frame_function /* can be empty */);
|
| -
|
| - ~StackFrame();
|
| -
|
| - bool operator==(const StackFrame& rhs) const;
|
| - };
|
| - typedef std::vector<StackFrame> StackTrace;
|
| -
|
| RuntimeError(bool from_incognito,
|
| const base::string16& source,
|
| const base::string16& message,
|
| - logging::LogSeverity level,
|
| - const base::string16& details);
|
| + const StackTrace& stack_trace,
|
| + const GURL& context_url,
|
| + logging::LogSeverity level);
|
| virtual ~RuntimeError();
|
|
|
| virtual std::string PrintForTest() const OVERRIDE;
|
|
|
| - const base::string16& execution_context_url() const {
|
| - return execution_context_url_;
|
| - }
|
| + const GURL& context_url() const { return context_url_; }
|
| const StackTrace& stack_trace() const { return stack_trace_; }
|
| private:
|
| virtual bool IsEqualImpl(const ExtensionError* rhs) const OVERRIDE;
|
|
|
| - // Parse the JSON |details| passed to the error. This includes a stack trace
|
| - // and an execution context url.
|
| - void ParseDetails(const base::string16& details);
|
| - // Try to determine the ID of the extension. This may be obtained through the
|
| - // reported source, or through the execution context url.
|
| - void DetermineExtensionID();
|
| + // Since we piggy-back onto other error reporting systems (like V8 and
|
| + // WebKit), the reported information may need to be cleaned up in order to be
|
| + // in a consistent format.
|
| + void CleanUpInit();
|
|
|
| - base::string16 execution_context_url_;
|
| + GURL context_url_;
|
| StackTrace stack_trace_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RuntimeError);
|
|
|