| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2011, 2012 Google Inc.  All rights reserved. |    2  * Copyright (C) 2011, 2012 Google Inc.  All rights reserved. | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions are |    5  * modification, are permitted provided that the following conditions are | 
|    6  * met: |    6  * met: | 
|    7  * |    7  * | 
|    8  *     * Redistributions of source code must retain the above copyright |    8  *     * Redistributions of source code must retain the above copyright | 
|    9  * notice, this list of conditions and the following disclaimer. |    9  * notice, this list of conditions and the following disclaimer. | 
|   10  *     * Redistributions in binary form must reproduce the above |   10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  463 // which causes the bridge to get disconnected from the WebSocket and deleted if
      there is no other reference. |  463 // which causes the bridge to get disconnected from the WebSocket and deleted if
      there is no other reference. | 
|  464 bool Bridge::waitForMethodCompletion(PassOwnPtr<ExecutionContextTask> task) |  464 bool Bridge::waitForMethodCompletion(PassOwnPtr<ExecutionContextTask> task) | 
|  465 { |  465 { | 
|  466     ASSERT(m_workerGlobalScope); |  466     ASSERT(m_workerGlobalScope); | 
|  467     ASSERT(m_syncHelper); |  467     ASSERT(m_syncHelper); | 
|  468  |  468  | 
|  469     m_loaderProxy->postTaskToLoader(task); |  469     m_loaderProxy->postTaskToLoader(task); | 
|  470  |  470  | 
|  471     // We wait for the syncHelper event even if a shutdown event is fired. |  471     // We wait for the syncHelper event even if a shutdown event is fired. | 
|  472     // See https://codereview.chromium.org/267323004/#msg43 for why we need to w
     ait this. |  472     // See https://codereview.chromium.org/267323004/#msg43 for why we need to w
     ait this. | 
|  473     SafePointScope scope(ThreadState::HeapPointersOnStack); |  473     SafePointScope scope(BlinkGC::HeapPointersOnStack); | 
|  474     m_syncHelper->wait(); |  474     m_syncHelper->wait(); | 
|  475     // This is checking whether a shutdown event is fired or not. |  475     // This is checking whether a shutdown event is fired or not. | 
|  476     return !m_workerGlobalScope->thread()->terminated(); |  476     return !m_workerGlobalScope->thread()->terminated(); | 
|  477 } |  477 } | 
|  478  |  478  | 
|  479 DEFINE_TRACE(Bridge) |  479 DEFINE_TRACE(Bridge) | 
|  480 { |  480 { | 
|  481     visitor->trace(m_client); |  481     visitor->trace(m_client); | 
|  482     visitor->trace(m_workerGlobalScope); |  482     visitor->trace(m_workerGlobalScope); | 
|  483     visitor->trace(m_syncHelper); |  483     visitor->trace(m_syncHelper); | 
|  484     visitor->trace(m_peer); |  484     visitor->trace(m_peer); | 
|  485 } |  485 } | 
|  486  |  486  | 
|  487 } // namespace blink |  487 } // namespace blink | 
| OLD | NEW |