Package com.google.speedtracer.client.SymbolServerManifest

Examples of com.google.speedtracer.client.SymbolServerManifest.ResourceSymbolInfo


      }
    });
  }

  private ResourceSymbolInfo lookupEntryInManifest(String resourceUrl) {
    ResourceSymbolInfo resourceSymbolInfo = null;
   
    // If the resourceUrl begins with a '/' then we assume it is relative to the
    // origin.
    String relativeUrl = "";
    if (resourceUrl.charAt(0) == '/') {
View Full Code Here


  }

  private void serviceRequest(PendingRequest request) {
    assert manifestLoaded : "Manifest should be loaded";

    final ResourceSymbolInfo resourceSymbolInfo = lookupEntryInManifest(request.resourceUrl);
    final Callback callback = request.callback;
    if (resourceSymbolInfo == null) {
      if (ClientConfig.isDebugMode()) {
        Logging.getLogger().logText(
            "Resymbolization failed: No symbol info for " + request.resourceUrl);
      }
      callback.onSymbolsFetchFailed(ERROR_SYMBOL_FETCH_FAIL);
      return;
    }

    final String symbolMapUrl = resourceSymbolInfo.getSymbolMapUrl();
    JsSymbolMap symbolMap = get(symbolMapUrl);
    // We only want to request and parse for symbolMaps we havn't already
    // parsed.
    if (symbolMap == null) {
      // Create the XhrCallback to service this request.
      XhrCallback xhrCallback = new XhrCallback() {

        public void onFail(XMLHttpRequest xhr) {
          callback.onSymbolsFetchFailed(ERROR_SYMBOL_FETCH_FAIL);
          dequeuePendingXhrs(symbolMapUrl, xhr, false);
          if (ClientConfig.isDebugMode()) {
            Logging.getLogger().logText(
                "Fetching symbol map: " + symbolMapUrl + " failed.");
          }
        }

        public void onSuccess(XMLHttpRequest xhr) {
          // Double check that another XHR didnt pull it down and parse it.
          JsSymbolMap fetchedSymbolMap = get(symbolMapUrl);
          if (fetchedSymbolMap == null) {
            fetchedSymbolMap = JsSymbolMap.parse(
                resourceSymbolInfo.getSourceServer(),
                resourceSymbolInfo.getSourceViewerServer(),
                resourceSymbolInfo.getType(), xhr.getResponseText());
            put(symbolMapUrl, fetchedSymbolMap);
          }
          callback.onSymbolsReady(fetchedSymbolMap);
          dequeuePendingXhrs(symbolMapUrl, xhr, true);
          if (ClientConfig.isDebugMode()) {
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.SymbolServerManifest.ResourceSymbolInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.