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

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

Issue 2695933003: Remove V8IsolateInterruptor (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 CORE_EXPORT void moveEventListenerToNewWrapper(v8::Isolate*, 1124 CORE_EXPORT void moveEventListenerToNewWrapper(v8::Isolate*,
1125 v8::Local<v8::Object>, 1125 v8::Local<v8::Object>,
1126 EventListener* oldValue, 1126 EventListener* oldValue,
1127 v8::Local<v8::Value> newValue, 1127 v8::Local<v8::Value> newValue,
1128 int cacheIndex); 1128 int cacheIndex);
1129 1129
1130 // Result values for platform object 'deleter' methods, 1130 // Result values for platform object 'deleter' methods,
1131 // http://www.w3.org/TR/WebIDL/#delete 1131 // http://www.w3.org/TR/WebIDL/#delete
1132 enum DeleteResult { DeleteSuccess, DeleteReject, DeleteUnknownProperty }; 1132 enum DeleteResult { DeleteSuccess, DeleteReject, DeleteUnknownProperty };
1133 1133
1134 class V8IsolateInterruptor final : public BlinkGCInterruptor {
1135 public:
1136 explicit V8IsolateInterruptor(v8::Isolate* isolate) : m_isolate(isolate) {}
1137
1138 static void onInterruptCallback(v8::Isolate* isolate, void* data) {
1139 V8IsolateInterruptor* interruptor =
1140 reinterpret_cast<V8IsolateInterruptor*>(data);
1141 interruptor->onInterrupted();
1142 }
1143
1144 void requestInterrupt() override {
1145 m_isolate->RequestInterrupt(&onInterruptCallback, this);
1146 }
1147
1148 private:
1149 v8::Isolate* m_isolate;
1150 };
1151
1152 // Freeze a V8 object. The type of the first parameter and the return value is 1134 // Freeze a V8 object. The type of the first parameter and the return value is
1153 // intentionally v8::Value so that this function can wrap ToV8(). 1135 // intentionally v8::Value so that this function can wrap ToV8().
1154 // If the argument isn't an object, this will crash. 1136 // If the argument isn't an object, this will crash.
1155 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, 1137 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>,
1156 v8::Isolate*); 1138 v8::Isolate*);
1157 1139
1158 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, 1140 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*,
1159 const String& stringifiedJSON, 1141 const String& stringifiedJSON,
1160 ExceptionState&); 1142 ExceptionState&);
1161 } // namespace blink 1143 } // namespace blink
1162 1144
1163 #endif // V8Binding_h 1145 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698