| 798 | { return numArgs; } |
| 799 | |
| 800 | void JavascriptProcessor::SnippetDocument::replaceContentAsync(String s, bool shouldBeAsync) |
| 801 | { |
| 802 | |
| 803 | #if USE_FRONTEND |
| 804 | // Not important when using compiled plugins because there will be no editor component |
| 805 | // being resized... |
| 806 | replaceAllContent(s); |
| 807 | #else |
| 808 | { |
| 809 | // Makes sure that this won't be accessed during replacement... |
| 810 | SpinLock::ScopedLockType sl(pendingLock); |
| 811 | pendingNewContent.swapWith(s); |
| 812 | } |
| 813 | |
| 814 | if(shouldBeAsync) |
| 815 | { |
| 816 | notifier.notify(); |
| 817 | } |
| 818 | else |
| 819 | { |
| 820 | notifier.handleAsyncUpdate(); |
| 821 | } |
| 822 | #endif |
| 823 | } |
| 824 | |
| 825 | JavascriptProcessor::SnippetDocument::Notifier::Notifier(SnippetDocument& parent_): |
| 826 | parent(parent_) |
no test coverage detected