Changeset 170569 in webkit


Ignore:
Timestamp:
Jun 28, 2014, 3:31:26 PM (11 years ago)
Author:
mitz@apple.com
Message:

REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
https://bugs.webkit.org/show_bug.cgi?id=134429

Reviewed by Tim Horton.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r170568 r170569  
     12014-06-28  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
     4        https://bugs.webkit.org/show_bug.cgi?id=134429
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/mac/WebPageProxyMac.mm:
     9        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
     10
    1112014-06-27  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm

    r170450 r170569  
    328328void WebPageProxy::attributedSubstringForCharacterRangeAsync(const EditingRange& range, std::function<void (const AttributedString&, const EditingRange&, CallbackBase::Error)> callbackFunction)
    329329{
    330     RefPtr<AttributedStringForCharacterRangeCallback> callback = AttributedStringForCharacterRangeCallback::create(std::move(callbackFunction));
    331 
    332330    if (!isValid()) {
    333         callback->invalidate();
    334         return;
    335     }
    336 
    337     uint64_t callbackID = callback->callbackID();
    338     m_callbacks.put(std::move(callbackFunction), std::make_unique<ProcessThrottler::BackgroundActivityToken>(m_process->throttler()));
     331        callbackFunction(AttributedString(), EditingRange(), CallbackBase::Error::Unknown);
     332        return;
     333    }
     334
     335    uint64_t callbackID = m_callbacks.put(std::move(callbackFunction), std::make_unique<ProcessThrottler::BackgroundActivityToken>(m_process->throttler()));
    339336
    340337    process().send(Messages::WebPage::AttributedSubstringForCharacterRangeAsync(range, callbackID), m_pageID);
Note: See TracChangeset for help on using the changeset viewer.