Examples of JsSymbol


Examples of com.google.speedtracer.client.model.JsSymbol

    String sourceFileName = fileName.substring(fileName.lastIndexOf('/') + 1,
        fileName.length());

    String sourceSymbolName = className + "::" + memberName;

    JsSymbol sourceSymbol = new JsSymbol(new Url(sourcePathBase
        + sourceFileName), Integer.parseInt(sourceLine), sourceSymbolName,
        false, fileName);
    symbolMap.put(jsName, sourceSymbol);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

        // TODO (jaimeyap): Do something here... or not.
      }

      public void onSymbolsReady(final JsSymbolMap symbols) {
        // Extract the source symbol.
        final JsSymbol sourceSymbol = symbols.lookup(symbolName);

        if (sourceSymbol == null) {
          return;
        }
        // Enhance the rendered frame with the resymbolization.
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

    // The path relative to the source server. We assume it is just the class
    // path base.
    String sourcePathBase = packageName.replace(".", "/");
    String sourceSymbolName = packageName + className + "::" + memberName;

    JsSymbol sourceSymbol = new JsSymbol(new Url(sourcePathBase + fileName),
        Integer.parseInt(sourceLine), sourceSymbolName, false, fileName);
    symbolMap.put(jsName, sourceSymbol);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

    // Add resymbolized data to frame/profile if it is available.
    Command.defer(new Command.Method() {
      public void execute() {
        if (ssController != null) {
          final JsSymbol childSymbol = child.getSymbol();
          ssController.attemptResymbolization(
              childSymbol.getResourceUrl().getUrl(),
              childSymbol.getSymbolName(), childRenderer, sourcePresenter);
        }
      }
    });
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

        resizeCallback.onResize();
      }
    }

    void render() {
      final JsSymbol childSymbol = profileNode.getSymbol();
      symbolNameCell = row.insertCell(-1);
      symbolNameCell.setInnerText(formatSymbolName(childSymbol));
      final TableCellElement resourceCell = row.insertCell(-1);
      renderResourceLocation(resourceCell, childSymbol);
      row.insertCell(-1).setInnerHTML(
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

        final ProfileItem item = new ProfileItem(this, profileChild);
        // Add resymbolized data to frame/profile if it is available.
        Command.defer(new Command.Method() {
          public void execute() {
            if (ssController != null) {
              JsSymbol jsSymbol = profileChild.getSymbol();
              ssController.attemptResymbolization(
                  jsSymbol.getResourceUrl().getUrl(), jsSymbol.getSymbolName(),
                  item, sourcePresenter);
            }
          }
        });
        addChildrenRecursive(item, resources, children.get(i), 1);
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

          final ProfileItem childItem = new ProfileItem(item, profileChild);
          // Add resymbolized data to frame/profile if it is available.
          Command.defer(new Command.Method() {
            public void execute() {
              if (ssController != null) {
                final JsSymbol childSymbol = profileChild.getSymbol();
                ssController.attemptResymbolization(
                    childSymbol.getResourceUrl().getUrl(),
                    childSymbol.getSymbolName(), childItem, sourcePresenter);
              }
            }
          });
          addChildrenRecursive(childItem, resources, children.get(i), depth + 1);
        } else {
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

        // The bottom div is reserved for the resymbolized link.
        bottomDiv = container.getDocument().createDivElement();
        bottomDiv.setClassName(css.treeItemBottomDiv());
        this.getItemLabelElement().appendChild(bottomDiv);

        final JsSymbol symbol = profileNode.getSymbol();
        SpanElement symbolNameElement = container.getDocument().createSpanElement();
        symbolNameElement.setInnerText(formatSymbolName(symbol));
        topDiv.appendChild(symbolNameElement);
        renderResourceLocation(topDiv, symbol);
        SpanElement timeValue = container.getDocument().createSpanElement();
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

   */
  public void testAddSymbol() {
    String sourceServer = "http://notrealsourceserver";
    TestableSymbolMap symbolMap = new TestableSymbolMap(sourceServer);

    JsSymbol nullSymbol = symbolMap.lookup("IDontExist");
    assertTrue(nullSymbol == null);

    Url resourceUrl = new Url("path/to/a/resource/MyResource.java");
    int lineNumber = 14;
    String symbolName = "path.to.a.resource.MyResource.InnerClass::methodName";
    JsSymbol symbol = new JsSymbol(resourceUrl, lineNumber, symbolName);

    assertEquals(symbolMap.getSourceServer(), sourceServer + "/");

    String obfuscatedName = "APU";
    symbolMap.put(obfuscatedName, symbol);

    JsSymbol retrievedSymbol = symbolMap.lookup(obfuscatedName);
    assertEquals(resourceUrl.getPath(),
        retrievedSymbol.getResourceUrl().getPath());
    assertEquals(resourceUrl.getLastPathComponent(),
        retrievedSymbol.getResourceUrl().getLastPathComponent());
    assertEquals(lineNumber, retrievedSymbol.getLineNumber());
    assertEquals(symbolName, retrievedSymbol.getSymbolName());
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.JsSymbol

  }

  private void testGwtSymbol(JsSymbolMap symbolMap, String obfuscatedSymbol,
      String className, String memberName, String sourcePathBase,
      String sourceFileName, int lineNumber) {
    JsSymbol symbol = symbolMap.lookup(obfuscatedSymbol);
    assertTrue(symbol != null);

    assertEquals(sourcePathBase, symbol.getResourceUrl().getResourceBase());
    assertEquals(sourceFileName, symbol.getResourceUrl().getLastPathComponent());
    assertEquals(lineNumber, symbol.getLineNumber());
    assertEquals(className + "::" + memberName, symbol.getSymbolName());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.