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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp

Issue 2408083003: Drop [ExperimentalCallbackFunction] (Closed)
Patch Set: Update tests and expectations Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp b/third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp
deleted file mode 100644
index 1dab12e47337583760fd8fc935158df192129193..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/bindings/tests/results/core/LongExperimentalCallbackFunction.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
-
-// clang-format off
-
-#include "LongExperimentalCallbackFunction.h"
-
-#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/ScriptState.h"
-#include "bindings/core/v8/ToV8.h"
-#include "bindings/core/v8/V8Binding.h"
-#include "core/dom/ExecutionContext.h"
-#include "wtf/Assertions.h"
-
-namespace blink {
-
-LongExperimentalCallbackFunction::LongExperimentalCallbackFunction(v8::Isolate* isolate, v8::Local<v8::Function> callback)
- : m_callback(isolate, callback)
-{
- DCHECK(!m_callback.isEmpty());
- m_callback.setPhantom();
-}
-
-DEFINE_TRACE(LongExperimentalCallbackFunction)
-{
-}
-
-bool LongExperimentalCallbackFunction::call(ScriptState* scriptState, ScriptWrappable* scriptWrappable, int num1, int num2, int& returnValue)
-{
- if (!scriptState->contextIsValid())
- return false;
-
- ExecutionContext* context = scriptState->getExecutionContext();
- DCHECK(context);
- if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreStopped())
- return false;
-
- if (m_callback.isEmpty())
- return false;
-
- // TODO(bashi): Make sure that using TrackExceptionState is OK.
- // crbug.com/653769
- TrackExceptionState exceptionState;
- ScriptState::Scope scope(scriptState);
-
- v8::Local<v8::Value> num1Argument = v8::Integer::New(scriptState->isolate(), num1);
- v8::Local<v8::Value> num2Argument = v8::Integer::New(scriptState->isolate(), num2);
-
- v8::Local<v8::Value> thisValue = toV8(scriptWrappable, scriptState->context()->Global(), scriptState->isolate());
-
- v8::Local<v8::Value> argv[] = { num1Argument, num2Argument };
-
- v8::Local<v8::Value> v8ReturnValue;
- v8::TryCatch exceptionCatcher(scriptState->isolate());
- exceptionCatcher.SetVerbose(true);
-
- if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), thisValue, 2, argv, scriptState->isolate()).ToLocal(&v8ReturnValue))
- {
- int cppValue = toInt32(scriptState->isolate(), v8ReturnValue, NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return false;
- returnValue = cppValue;
- return true;
- }
- return false;
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698