Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Generate metadata for method parameters #1370

Merged

Conversation

helpermethod
Copy link

@helpermethod helpermethod commented Aug 31, 2023

Generates metadata for method parameters. Useful for inspecting method parameters via reflection.

Fixed #1368.

javap output before change:

  public void startTracing(com.microsoft.playwright.Page, com.microsoft.playwright.Browser$StartTracingOptions);
    descriptor: (Lcom/microsoft/playwright/Page;Lcom/microsoft/playwright/Browser$StartTracingOptions;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=3
         0: aload_0
         1: ldc_w         #377                // String Browser.startTracing
         4: aload_0
         5: aload_1
         6: aload_2
         7: invokedynamic #379,  0            // InvokeDynamic #3:run:(Lcom/microsoft/playwright/impl/BrowserImpl;Lcom/microsoft/playwright/Page;Lcom/microsoft/playwright/Browser$StartTracingOptions;)Ljava/lang/Runnable;
        12: invokevirtual #52                 // Method withLogging:(Ljava/lang/String;Ljava/lang/Runnable;)V
        15: return
      LineNumberTable:
        line 231: 0
        line 232: 15
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      16     0  this   Lcom/microsoft/playwright/impl/BrowserImpl;
            0      16     1  page   Lcom/microsoft/playwright/Page;
            0      16     2 options   Lcom/microsoft/playwright/Browser$StartTracingOptions;

javap output after change:

  public void startTracing(com.microsoft.playwright.Page, com.microsoft.playwright.Browser$StartTracingOptions);
    descriptor: (Lcom/microsoft/playwright/Page;Lcom/microsoft/playwright/Browser$StartTracingOptions;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=3
         0: aload_0
         1: ldc_w         #377                // String Browser.startTracing
         4: aload_0
         5: aload_1
         6: aload_2
         7: invokedynamic #379,  0            // InvokeDynamic #3:run:(Lcom/microsoft/playwright/impl/BrowserImpl;Lcom/microsoft/playwright/Page;Lcom/microsoft/playwright/Browser$StartTracingOptions;)Ljava/lang/Runnable;
        12: invokevirtual #52                 // Method withLogging:(Ljava/lang/String;Ljava/lang/Runnable;)V
        15: return
      LineNumberTable:
        line 231: 0
        line 232: 15
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      16     0  this   Lcom/microsoft/playwright/impl/BrowserImpl;
            0      16     1  page   Lcom/microsoft/playwright/Page;
            0      16     2 options   Lcom/microsoft/playwright/Browser$StartTracingOptions;
    MethodParameters:
      Name                           Flags
      page
      options

@helpermethod
Copy link
Author

Are the test failures related to my change?

@yury-s
Copy link
Member

yury-s commented Sep 1, 2023

No, these are just old flaky tests.

@yury-s yury-s merged commit 2dbfa9d into microsoft:main Sep 1, 2023
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Generate metadata for method parameters
2 participants