Changeset 14602 for trunk/FACT++


Ignore:
Timestamp:
11/10/12 22:41:29 (12 years ago)
Author:
tbretz
Message:
Some fixes from the latest changes; added some comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.cc

    r14601 r14602  
    4040// termination. Therefor a list of V8 thread ids is created.
    4141//
    42 // If temrination has already be signalled, no thread should start running
     42// If termination has already be signalled, no thread should start running
    4343// anymore (thy could, e.g., wait for their locking). So after locking
    4444// it has to be checked if the thread was terminated already. Note
    4545// that all calls to Terminate() must be locked to ensure that fThreadId
    4646// is correct when it is checked.
     47//
     48// The current thread id must be added to fThreadIds _before_ any
     49// function is called after Locking and before execution is given
     50// back to JavaScript, e.g. in script->Run(). So until the thread
     51// is added to the list Terminate will not be executed. If Terminate
     52// is then executed, it is ensured that the current thread is
     53// already in the list. If terminate has been called before
     54// the Locking, the check for the validiy of fThreadId ensures that
     55// nothing is executed.
    4756//
    4857// Empty handles:
     
    938947
    939948    Handle<Object> obj = it->second;
    940     if (!obj.IsEmpty())
     949    if (obj.IsEmpty())
    941950        return;
    942951
    943952    const Handle<String> onchange = String::New("onchange");
    944     if (obj->Has(onchange))
     953    if (!obj->Has(onchange))
    945954        return;
    946955
    947956    const Handle<Value> val = obj->Get(onchange);
    948     if (val->IsFunction())
     957    if (!val->IsFunction())
    949958        return;
    950959
Note: See TracChangeset for help on using the changeset viewer.