mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:28:13 +00:00
Spreadsheet: Override visit_edges()
and visit stored JS objects
...and don't let them leak out of their evaluation contexts. Also keep the exceptions separate from the actual values. This greatly reduces the number of assertions hit while entering random data into a sheet.
This commit is contained in:
parent
b3a9a25416
commit
7c8d35600c
11 changed files with 110 additions and 43 deletions
|
@ -67,6 +67,10 @@ struct Cell : public Weakable<Cell> {
|
|||
void set_data(String new_data);
|
||||
void set_data(JS::Value new_data);
|
||||
bool dirty() const { return m_dirty; }
|
||||
void clear_dirty() { m_dirty = false; }
|
||||
|
||||
void set_exception(JS::Exception* exc) { m_js_exception = exc; }
|
||||
JS::Exception* exception() const { return m_js_exception; }
|
||||
|
||||
const String& data() const { return m_data; }
|
||||
const JS::Value& evaluated_data() const { return m_evaluated_data; }
|
||||
|
@ -117,6 +121,7 @@ private:
|
|||
bool m_evaluated_externally { false };
|
||||
String m_data;
|
||||
JS::Value m_evaluated_data;
|
||||
JS::Exception* m_js_exception { nullptr };
|
||||
Kind m_kind { LiteralString };
|
||||
WeakPtr<Sheet> m_sheet;
|
||||
Vector<WeakPtr<Cell>> m_referencing_cells;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue