chromium/extensions/renderer/bindings/exception_handler.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/renderer/bindings/exception_handler.h"

#include "base/check.h"
#include "base/strings/stringprintf.h"
#include "base/supports_user_data.h"
#include "extensions/renderer/bindings/api_binding_util.h"
#include "extensions/renderer/bindings/get_per_context_data.h"
#include "extensions/renderer/bindings/js_runner.h"
#include "gin/converter.h"
#include "gin/handle.h"
#include "gin/per_context_data.h"
#include "gin/wrappable.h"

namespace extensions {

namespace {

struct ExceptionHandlerPerContextData : public base::SupportsUserData::Data {};

constexpr char ExceptionHandlerPerContextData::kPerContextDataKey[];

// A helper class to wrap an ExceptionHandler WeakPtr in a v8::Value.
class WrappedExceptionHandler : public gin::Wrappable<WrappedExceptionHandler> {};

gin::WrapperInfo WrappedExceptionHandler::kWrapperInfo =;

}  // namespace

ExceptionHandler::ExceptionHandler(
    const binding::AddConsoleError& add_console_error)
    :{}
ExceptionHandler::~ExceptionHandler() = default;

v8::Local<v8::Value> ExceptionHandler::GetV8Wrapper(v8::Isolate* isolate) {}

ExceptionHandler* ExceptionHandler::FromV8Wrapper(v8::Isolate* isolate,
                                                  v8::Local<v8::Value> value) {}

void ExceptionHandler::HandleException(v8::Local<v8::Context> context,
                                       const std::string& message,
                                       v8::TryCatch* try_catch) {}

void ExceptionHandler::HandleException(v8::Local<v8::Context> context,
                                       const std::string& full_message,
                                       v8::Local<v8::Value> exception_value) {}

void ExceptionHandler::SetHandlerForContext(v8::Local<v8::Context> context,
                                            v8::Local<v8::Function> handler) {}

void ExceptionHandler::RunExtensionCallback(
    v8::Local<v8::Context> context,
    v8::Local<v8::Function> extension_callback,
    v8::LocalVector<v8::Value> callback_arguments,
    const std::string& message) {}

v8::Local<v8::Function> ExceptionHandler::GetCustomHandler(
    v8::Local<v8::Context> context) {}

}  // namespace extensions