V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
liveedit.h
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_DEBUG_LIVEEDIT_H_
6 #define V8_DEBUG_LIVEEDIT_H_
7 
8 #include <vector>
9 
10 #include "src/globals.h"
11 #include "src/handles.h"
12 
13 namespace v8 {
14 namespace debug {
15 struct LiveEditResult;
16 }
17 namespace internal {
18 
19 class Script;
20 class String;
21 class Debug;
22 class JavaScriptFrame;
23 
25  int start_position;
26  int end_position;
27  int new_start_position;
28  int new_end_position;
29 };
30 
58  public:
59  static void InitializeThreadLocal(Debug* debug);
60 
61  // Restarts the call frame and completely drops all frames above it.
62  static bool RestartFrame(JavaScriptFrame* frame);
63 
64  static void CompareStrings(Isolate* isolate, Handle<String> a,
66  std::vector<SourceChangeRange>* diffs);
67  static int TranslatePosition(const std::vector<SourceChangeRange>& changed,
68  int position);
69  static void PatchScript(Isolate* isolate, Handle<Script> script,
70  Handle<String> source, bool preview,
71  debug::LiveEditResult* result);
72  // Architecture-specific constant.
73  static const bool kFrameDropperSupported;
74 };
75 } // namespace internal
76 } // namespace v8
77 
78 #endif // V8_DEBUG_LIVEEDIT_H_
Definition: libplatform.h:13