@@ -1636,7 +1636,7 @@ webdriver.promise.ControlFlow.prototype.runInNewFrame_ = function(
1636
1636
webdriver . promise . popFlow_ ( ) ;
1637
1637
this . schedulingFrame_ = null ;
1638
1638
}
1639
- newFrame . lockFrame ( ) ;
1639
+ newFrame . isLocked_ = true ;
1640
1640
1641
1641
// If there was nothing scheduled in the new frame we can discard the
1642
1642
// frame and return immediately.
@@ -1833,13 +1833,13 @@ webdriver.promise.Frame_ = function(flow) {
1833
1833
this . pendingTask_ = null ;
1834
1834
1835
1835
/**
1836
- * Whether this frame is active . A frame is considered active once one of its
1837
- * descendants has been removed for execution .
1836
+ * Whether this frame is currently locked . A locked frame represents an
1837
+ * executed function that has scheduled all of its tasks .
1838
1838
*
1839
- * Adding a sub- frame as a child to an active frame is an indication that
1840
- * a callback to a {@link webdriver.promise.Deferred} is being invoked and any
1841
- * tasks scheduled within it should have priority over previously scheduled
1842
- * tasks :
1839
+ * <p>Once a frame becomes locked, any new frames which are added as children
1840
+ * represent interrupts (such as a {@link webdriver.promise.Promise}
1841
+ * callback) whose tasks must be given priority over those already scheduled
1842
+ * within this frame. For example :
1843
1843
* <code><pre>
1844
1844
* var flow = webdriver.promise.controlFlow();
1845
1845
* flow.execute('start here', goog.nullFunction).then(function() {
@@ -1850,18 +1850,6 @@ webdriver.promise.Frame_ = function(flow) {
1850
1850
*
1851
1851
* @private {boolean}
1852
1852
*/
1853
- this . isActive_ = false ;
1854
-
1855
- /**
1856
- * Whether this frame is currently locked. A locked frame represents a callback
1857
- * or task function which has run to completion and scheduled all of its tasks.
1858
- *
1859
- * <p>Once a frame becomes {@link #isActive_ active}, any new frames which are
1860
- * added represent callbacks on a {@link webdriver.promise.Deferred}, whose
1861
- * tasks must be given priority over previously scheduled tasks.
1862
- *
1863
- * @private {boolean}
1864
- */
1865
1853
this . isLocked_ = false ;
1866
1854
} ;
1867
1855
goog . inherits ( webdriver . promise . Frame_ , webdriver . promise . Node_ ) ;
@@ -1925,12 +1913,6 @@ webdriver.promise.Frame_.prototype.setPendingTask = function(task) {
1925
1913
} ;
1926
1914
1927
1915
1928
- /** Locks this frame. */
1929
- webdriver . promise . Frame_ . prototype . lockFrame = function ( ) {
1930
- this . isLocked_ = true ;
1931
- } ;
1932
-
1933
-
1934
1916
/**
1935
1917
* Adds a new node to this frame.
1936
1918
* @param {!(webdriver.promise.Frame_|webdriver.promise.Task_) } node
@@ -1946,7 +1928,7 @@ webdriver.promise.Frame_.prototype.addChild = function(node) {
1946
1928
1947
1929
node . setParent ( this ) ;
1948
1930
1949
- if ( this . isActive_ && node instanceof webdriver . promise . Frame_ ) {
1931
+ if ( this . isLocked_ && node instanceof webdriver . promise . Frame_ ) {
1950
1932
var index = 0 ;
1951
1933
if ( this . lastInsertedChild_ instanceof
1952
1934
webdriver . promise . Frame_ ) {
@@ -1967,7 +1949,7 @@ webdriver.promise.Frame_.prototype.addChild = function(node) {
1967
1949
* fist child.
1968
1950
*/
1969
1951
webdriver . promise . Frame_ . prototype . getFirstChild = function ( ) {
1970
- this . isActive_ = true ;
1952
+ this . isLocked_ = true ;
1971
1953
this . lastInsertedChild_ = null ;
1972
1954
return this . children_ [ 0 ] ;
1973
1955
} ;
0 commit comments