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

Unified Diff: runtime/vm/object.h

Issue 1850653003: Provide ability to patch external functions in a class that has already been finalized. The follow… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 9 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: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8a818f64b0353bc2ddc39183286d0f73890a9f79..4a08dbabeb20750cd7f0ea13055223b9d6a688e3 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1265,6 +1265,12 @@ class Class : public Object {
void set_is_prefinalized() const;
+ bool is_refinalize() const {
+ return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
+ == RawClass::kRefinalize;
+ }
+
+ void SetRefinalize() const;
void ResetFinalization() const;
regis 2016/03/31 18:16:49 The two calls SetRefinalize and ResetFinalization
siva 2016/03/31 23:48:08 I went with SetRefinalizeAfterPatch (a bit verbose
bool is_marked_for_parsing() const {
@@ -1378,6 +1384,8 @@ class Class : public Object {
bool TraceAllocation(Isolate* isolate) const;
void SetTraceAllocation(bool trace_allocation) const;
+ bool ValidatePostFinalizePatch(const Class& orig_class, Error* error) const;
+
private:
enum MemberKind {
kAny = 0,

Powered by Google App Engine
This is Rietveld 408576698